登陆界面运行错误求助
Private Sub CmdOK_Click()Dim strUserName As String, strPassword As String
strUserName = txtUserName.Text
strPassword = txtPassword.Text
If strUserName = "" Then
MsgBox "ヌ・菠・テサァテ訒。", vbOKOnly + vbCritical, "セック・
txtUserName.SetFocus
Exit Sub
End If
If strPassword = "" Then
MsgBox "ヌ・菠・ワツ・。", vbOKOnly + vbCritical, "セック・
txtPassword.SetFocus
strUserName = MakeStr(strUserName)
strPassword = MakeStr(strPassword)
End If
If MyUser.ExistUser(strUserName) = False ThenMsgBox "エヒモテサァイサエ贇レ」。", vbOKOnly + vbCritical, "セック・
txtUserName = ""
txtUserName.SetFocus
Exit Sub
End If
MyUser.GrtInfo (strUserName)
If MyUser.strPWD <> strPassword Then
MsgBox "テワツ・﨔。", vbOKOnly + vbCritical, "セック・
txtPassword = ""
txtPassword.SetFocus
Exit Sub
End If
End Sub
Public Function ExistUser(ByVal UserName As String) As Boolean
Dim rs As New ADODB.Recordset
strSQL = "SELECT* FROM[モテサァア偰WHERE ID='" + Trim(tUserName) + "'"
Set rs = QueryExt(strSQL)
If Not rs.EOF Then
ExistUser = True
Else
ExistUser = False
End If
End Function
补充:VB , 基础类