本人新手,这是一个登录界面,ado控件已经连接数据库用户表,下面是我的代码
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 用户表 where 用户账号 ='" & Text1.Text & "' and 用户密码 ='" & Text2.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 1 Then
Form1.Hide
Form2.Show
Else
MsgBox ("请确认账号或密码!")
End If
End Sub
运行的时候总显示
......................
阅读全部 | 2018年1月5日 13:53