标题: [求助]请教登陆界面密码 [打印本页] 作者: sdgts 时间: 2006-11-12 22:00 标题: [求助]请教登陆界面密码 请教如下登陆界面的密码是什么,一下是事件代码。
Private Sub img0a1_Click()
On Error GoTo Err_img0a1_Click
If 组合2 = "" Or IsNull(Me.组合2) Then
MsgBox "请选择用户名!", vbOKOnly + vbInformation, "提示"
组合2.SetFocus
ElseIf 密码 = DLookup("[密码]", "用户密码表", "[用户名]= " & "'" & Me.组合2 & "'") Then
user = Me.组合2
userlx = 组合2.Column(2)
re = 0
DoCmd.Close acForm, "登录"
DoCmd.OpenForm "操作窗口"
Else
re = re + 1
MsgBox "您输入的密码不正确,请重新输入!", vbOKOnly + vbExclamation, "错误"
密码.SetFocus
If re > 2 Then
MsgBox "由于您三次输入的密码都不正确,系统将自动关闭!", vbOKOnly + vbCritical, "密码不正确"
DoCmd.Quit
End If
End If
Exit_img0a1_Click:
Exit Sub
Err_img0a1_Click:
MsgBox Err.Description
Resume Exit_img0a1_Click
End Sub
Private Sub img0a_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.img0a.Visible = False
Me.img0a1.Visible = True
End Sub
Private Sub Cmd取消_Click()
On Error GoTo Err_Cmd取消_Click
Private Sub cmqd_Click()
On Error GoTo Err_cmqd_Click
If 组合2 = "" Or IsNull(Me.组合2) Then
MsgBox "请选择用户名!", vbOKOnly + vbInformation, "提示"
组合2.SetFocus
ElseIf 密码 = DLookup("[密码]", "用户密码表", "[用户名]= " & "'" & Me.组合2 & "'") Then
user = Me.组合2
userlx = 组合2.Column(2)
re = 0
DoCmd.Close acForm, "登录"
DoCmd.OpenForm "操作窗口"
Else
re = re + 1
MsgBox "您输入的密码不正确,请重新输入!", vbOKOnly + vbExclamation, "错误"
密码.SetFocus
If re > 2 Then
MsgBox "由于您三次输入的密码都不正确,系统将自动关闭!", vbOKOnly + vbCritical, "密码不正确"
DoCmd.Quit
End If
End If
Exit_cmqd_Click:
Exit Sub
Err_cmqd_Click:
MsgBox Err.Description
Resume Exit_cmqd_Click
End Sub