Dim stemp As String
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
stemp = "select * from 表名"
rs.Open stemp, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
rs.AddNew
rs("表的字段名") = Me![窗体的控件名]
........
rs.Update
将上面的中文字改为你的实际名,具体注释请按F1查看帮助作者: laiguiyou 时间: 2007-5-12 03:07
If Nz([WLID]) = Nz(DLookup("[WLID]", "WL", "[WLID]=" & "'" & WLID & "'")) Then
MsgBox "此编号有重复"
Exit Sub
End If 作者: 一点通 时间: 2007-5-12 03:10
提问时应尽量不要指定某人回复,这样有可能失去其它人帮你的机会