登陆界面代码设计:
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
Private Sub Command1_Click()
Set adors = adoCon.Execute("select * from 用户表 where 用户姓名=ltrim('" & Text1 & "') and 密码=ltrim('" & Text2 & "') and 用户类型=ltrim('" & Combo1.Text & "')")
If adors.EOF Then
MsgBox "您输入的信息有误,请重新输入!", , "系统提示"
Text1 = ""
Text2 = ""
Text1.SetFocus
i = i + 1
If i = 3 Then
MsgBox "对不起,您已无权使用本系统!", , "系统提示"
Unload Me
End If
Else
Select Case adors!用户类型
Case "管理员"