才开始学习请指教!????
Private Sub cmdadd_Click()Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Dim quan As Boolean
If Check1.Value = 1 Then
quan = True
Else
quan = False
End If
conn.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & "data source=" & App.Path & "\data.mdb;" & "persist security info=false"
conn.Open
rs.Open "select * from admin", conn, adOpenKeyset, adLockBatchOptimistic
rs.AddNew
rs.Fields(1).Value = Text1.Text
rs.Fields(2).Value = Text2.Text
rs.Fields(3).Value = quan
rs.Update
rs.Close
conn.Close
End Sub
为什么添加不了记录?
没有错误提示