大家帮我看下这段VB代码哪错了啊,一直调试不出来~~
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT 密码 FROM 登录表 WHERE 登录账号='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount < 1 Then
Print MsgBox("用户名不存在", 48, "友情提醒")
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
If Text2.Text = Adodc1.Recordset("密码") Then
Print MsgBox("登录成功!欢迎您", 48, "友情提示")
Form1.Hide
Form2.Show
Else
Print MsgBox("密码错误!", 48, "提示信息")
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End If
End Sub
Adodc1.Refresh
调试说这个有问题
[解决办法]
你连上数据库了么?
添加引用了么?