原发布者:qq81123208
源程序清单1、文件名login(login.frm)功能说明:整个系统的登陆界面,需要输入用户名和登陆密码才能进入到系统中,进行借阅等操作。源代码:OptionExplicitDimcntAsIntegerPrivateSubCommand1_Click()DimsqlAsStringDimrs_loginAsNewADODB.RecordsetIfTrim(Combo1.Text)=""ThenMsgBox"没有这个用户",vbOKOnly+vbExclamation,""Combo1.SetFocusElsesql="select*from系统管理where用户名='"&Combo1.Text&"'"rs_login.Opensql,conn,adOpenKeyset,adLockPessimisticIfrs_login.EOF=TrueThenMsgBox"没有这个用户",vbOKOnly+vbExclamation,""Combo1.SetFocusElseIfTrim(rs_login.Fields(1))=Trim(txtpwd.Text)ThenuserID=Combo1.Textrs_login.CloseUnloadMeform1.ShowElseMsgBox"密码不正确",vbOKOnly+vbExclamation,""txtpwd.SetFocusEndIfEndIfEndIfcnt=cnt+1Ifcnt=3ThenUnloadMeEndIfExitSubEndSubPrivateSubCommand2_Click()UnloadMeEndSubPrivateSubForm_Load()DimconnectionstringAsStringconnectionstring="provider=Microsoft.Jet.oledb.4.0;"&_"datasource=book.mdb"conn.Openconnectionstringcnt=0EndSubPrivateSubtxtuser_Change()EndSub2、文