![]() |
#2
xzlxzlxzl2016-10-28 10:21
|

Private Sub cmdOK_Click()
Adodc1.RecordSource = "select * from User where UserName='" + txtUserName.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If txtPassword = Adodc1.Recordset.Fields("Password") Then
'将代码放在这里传递
'成功到 calling 函数
'设置全局变量时最容易的
LoginSucceeded = True
MsgBox "登录成功"
Me.Hide
Else
MsgBox "无效的密码,请重试!", , "登录"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
Else
MsgBox "无此用户"
End If
End Sub
Adodc1.RecordSource = "select * from User where UserName='" + txtUserName.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If txtPassword = Adodc1.Recordset.Fields("Password") Then
'将代码放在这里传递
'成功到 calling 函数
'设置全局变量时最容易的
LoginSucceeded = True
MsgBox "登录成功"
Me.Hide
Else
MsgBox "无效的密码,请重试!", , "登录"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
Else
MsgBox "无此用户"
End If
End Sub
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录