Dim rs As New ADODB.Recordset
Dim conx As New ADODB.Connection
Dim strSQL As String
If IsNull(me.txt1) Or IsNull(Me.txt2) Then
MsgBox "有重要信息未填写!"
Exit Sub
Else
strSQL = "select * from tbl1"
Set conx = CurrentProject.Connection
rs.Open strSQL, conx, 1, 3
With rs
.AddNew
.Fields("A") = me.txt1
.Fields("A") = me.txt2
.Update
.Close
End With