|
请教如下登陆界面的密码是什么,一下是事件代码。
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
DoCmd.Close
DoCmd.Quit
Exit_Cmd取消_Click:
Exit Sub
Err_Cmd取消_Click:
MsgBox Err.Description
Resume Exit_Cmd取消_Click
End Sub
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
Private Sub Form_Load()
DoCmd.Maximize
ImgTop.Width = Me.WindowWidth
ImgBot.Width = Me.WindowWidth
log.Left = Me.WindowWidth / 2 - log.Width - 200
log.Top = Me.WindowHeight / 2 - log.Height
ImgPic.Top = Me.WindowHeight / 2 - log.Height / 2 + 1000
ImgPic.Left = Me.WindowWidth / 2 + 100
ImgLine.Left = Me.WindowWidth / 2 - 300
bq1.Left = Me.WindowWidth / 2 + 1000
Me.组合2.Left = Me.WindowWidth / 2 + 1280
Me.组合2.Top = Me.WindowHeight / 2 - log.Height / 2 + 100
Me.img04.Left = Me.WindowWidth / 2 + Me.组合2.Width + 1000
Me.img04.Top = Me.WindowHeight / 2 - log.Height / 2 + 100
Me.yhb.Left = Me.WindowWidth / 2 + 1430
Me.yhb.Top = Me.WindowHeight / 2 - log.Height / 2 + 100
Me.密码.Left = Me.WindowWidth / 2 + 1280
Me.密码.Top = Me.WindowHeight / 2 - log.Height / 2 + 680
Me.img0a.Top = Me.WindowHeight / 2 - log.Height / 2 + 680
Me.img0a.Left = Me.WindowWidth / 2 + Me.密码.Width + 1480
Me.img0a1.Top = Me.WindowHeight / 2 - log.Height / 2 + 680
Me.img0a1.Left = Me.WindowWidth / 2 + Me.密码.Width + 1480
Me.mmb.Left = Me.WindowWidth / 2 + 1430
Me.mmb.Top = Me.WindowHeight / 2 - log.Height / 2 + 680
End Sub
Private Sub img0b1_Click()
DoCmd.Close
DoCmd.Quit
End Sub
Private Sub img0b_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.img0b1.Visible = True
Me.img0b.Visible = False
End Sub
Private Sub 窗体页脚_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.img0b.Visible = True
Me.img0b1.Visible = False
End Sub
Private Sub 主 |
|