Private Sub Command2_Click()
If Len(Nz(Me.id)) = 0 Then
MsgBox "用户名为空!请输入", vbCritical, "Error"
Me.id.SetFocus
Else
If Len(Nz(Me.password)) = 0 Then
MsgBox "密码为空!请输入", vbExclamation + vbOKOnly, "提醒您"
Me.password.SetFocus
Else
If DLookup("password", "社員マスタ", "id='" & id & "'") = [password] Then
Me.Visible = True
Me.password = True
MsgBox "登录成功!", vbExclamation, "提醒您"
id_authorization = DLookup("authorization", "社員マスタ", "id='" & Me.id & "'")
If id_authorization = 1 Then
MsgBox "打开窗体1"
End If
Else
MsgBox "您输入的密码有误,请重新输入,注意大小写!", vbExclamation + vbOKOnly, "提醒您!"
Me.password = ""
Me.password.SetFocus
End If
End If
End If
End Sub