1 源程序清单 1、文件名 login(login
frm) 功能说明:整个系统的登陆界面,需要输入用户名和登陆密码才能进入到系统中,进行借阅等操作
源代码: Option Explicit Dim cnt As Integer Private Sub Command1_Click() Dim sql As String Dim rs_login As New ADODB
Recordset If Trim(Combo1
Text) = "" Then MsgBox "没有这个用户", vbOKOnly + vbExclamation, "" Combo1
SetFocus Else sql = "select * from 系统管理 where 用户名='" & Combo1
Text & "'" rs_login
Open sql, conn, adOpenKeyset, adLockPessimistic If rs_login
EOF = True Then MsgBox "没有这个用户", vbOKOnly + vbExclamation, "" Combo1
SetFocus Else If Trim(rs_login
Fields(1)) = Trim(txtpwd
Text) Then userID = Combo1
Text rs_login
Close Unload Me form1
Show Else MsgBox "密码不正确", vbOKOnly + vbExclamation, "" txtpwd
SetFocus End If 2 End If End If cnt = cnt + 1 If cnt = 3 Then Unload Me End If Exit Sub End Sub Private Sub Command