VB6.0 使程序不能打开只能调用大神们帮帮忙
求一个简单的VB6程序源码拜托各位大神~
Public Function openRS(strSql As String, rs As ADODB.Recordset) Set rs = New ADODB.Recordset rs.Open strSql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic End Function Private Sub C_Click() Dim rs1 As ADODB.Recordset Set rs1 = New ADODB.Recordset strSql = "SELECT * FROM [info] " openRS (strSql), rs rs.addnew rs("a") =text1 rs("b") =text2 rs.update set rs=nothing End Sub
满意请采纳
代码如下.....当text1失去焦点的时候替换..当然,你可以在任何需要的地方调用 ReplaceJia Text1 来替换+号 Private Sub Text1_Validate(Cancel As Boolean) ReplaceJia Text1 End Sub Private Sub ReplaceJia(txtBox As TextBox) '把原来的{+}替换成+ txtBox = Replace(txtBox, "{+}", "+") '把所有的+ 替换成 {+} txtBox = Replace(txtBox, "+", "{+}") End Sub