vb登录界面问题
Private Sub Command1_Click()Adodc1.RecordSource = "select * from 用户记录 where 用户名='" + Text1.Text + "'"
Adodc1.Refresh
If Text1 = "" Then
MsgBox "请输入用户名"
Text1.SetFocus
Exit Sub
End If
If Text2 = "" Then
MsgBox "请输入密码"
Text2.SetFocus
Exit Sub
End If
If Adodc1.Recordset.EOF = True Then
MsgBox "该用户名不存在!"
Exit Sub
End If
If Text1.Text <> "" And Text2.Text <> "" Then
MsgBox "登录成功"
Load MDIForm1
MDIForm1.Show
Unload Me
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End
End Sub
为什么,代码有错误吗