请先看以下代码:
Private Sub CmdSave_Click()
Me.Refresh
If IsNull(DLookup("维修ID", "tbl维修", "维修ID='Me.维修ID' ")) Then
Dim Stemp As String
Dim rs As New ADODB.Recordset
rs.Open "tbl维修", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With rs
.AddNew
![维修ID] = Me.维修ID
![日期] = Me.日期
![维修类型] = Me.维修类型
。。。。。。。。。。。