我是新手,请大家看看,我的登陆介面代码哪里错了?
Private Sub Command1_Click()
Dim cn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cn = New ADODB.Connection
Set rst = New ADODB.Recordset
Dim strsql As String
cn.Open concn
strsql = "select userid,password from 管理员信息表 where userid='" & Text1.Text & "' and password='" & Text2.Text & "'"
Set rst = cn.Execute(strsql)
If rst.EOF = True And rst.BOF = Ture Then
MsgBox "密码错误或者用户名不存在!"
denglu.Show
Else
Unload Me
caidan.Show vbModal
End If
rst.Close
cn.Close
End Sub
Private Sub Form_Load()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
adodc1.ConnectionString = concn
adodc1.CommandType = db1
cn.Open concn
End Sub