Private Sub cmdOK_Click()Dim txtSQL As StringDim mrc As ADODB.RecordsetDim MsgText As StringUserName = ""If Trim(txtUserName.Text = "") ThenMsgBox "用户名不能为空!", vbOKOnly + vbExclamation, "警告"txtUserName.SetFocusElsetxtSQL = "select * from user_Info where user_ID = '" & txtUserName.Text & "'"Set mrc = ExecuteSQL(txtSQL, MsgText)If mrc.EOF = True ThenMsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"txtUserName.SetFocusElseIf Trim(mrc.Fields(1)) = Trim(txtPassword.Text) Thenok = Truemrc.CloseMe.HideUserName = Trim(txtUserName.Text)ElseMsgBox "输入密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"txtPassword.SetFocustxtPassword.Text = ""End IfEnd IfEnd Ifmicount = micount + 1If micount = 3 ThenMe.HideEnd IfExit SubEnd Sub
- 2 回答
- 0 关注
- 171 浏览
添加回答
举报
0/150
提交
取消