|
以后同一问题不要另开新贴
Private Sub 用户登陆_Click()
Dim stemp As String
If IsNull(Me![密码]) Then
MsgBox "请输入密码!", vbInformation, "输入密码"
Me![密码].SetFocus
Else
If IsNull(Me.Text6) Then
MsgBox "请输入用户名!", vbInformation, "提示"
Else
If Me.Text6 = DLookup("用户名", "系统用户", "密码='" & [密码] & "'") Then
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "主窗体"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "您输入的密码不正确", vbCritical, "密码错误"
Me.Requery
Me![密码].SetFocus
End If
End If
End If
exit_用户登陆_click:
Exit Sub
Resume exit_用户登陆_click:
End Sub
|
|