Private Sub Cmd保存_Click()
If Me.DataEntry Then
Call TJ
Else
Call XG
DoCmd.Close acForm, Me.Name, acSaveNo
DoCmd.Restore
End If
End Sub
-------------------------------------------
Public Sub XG()
Dim rst As Object
Dim strSQL As String
Dim currentID As String
Dim strFrm As String
If Nz(Me.客户名称, "") = "" Or _
Nz(Me.客户状态, "") = "" Or _
Nz(Me.地区, "") = "" _
Then
MsgBox "必填项【客户名称、客户状态、地区】不能为空!", vbCritical, "警告"
Me.客户名称.SetFocus
Exit Sub
End If