数据库连接问题
Private Sub ent_Click() '登入Dim i%
i = 0
If managename.Text <> "" Then
Adodc1.RecordSource = "select * from 管理员"
Adodc1.Refresh
Do While Adodc1.Recordset.EOF
If Trim(managename.Text) = Trim(Adodc1.Recordset.Fields("管理员姓名")) Then
i = 1
If managesecret.Text = Adodc1.Recordset.Fields("密码") Then
Load store
store.Visible = True
Unload manage
Else
MsgBox ("输入密码错误,请重新输入")
managename.Text = ""
managesecret.Text = ""
managename.SetFocus
Exit Sub
End If
End If
Adodc1.Recordset.MoveNext
Loop
Else
MsgBox ("管理员姓名不能为空,请重新输入")
managename.SetFocus
Exit Sub
End If
If i = 0 Then
MsgBox ("管理员姓名错误,请重新输入")
managename.Text = ""
managesecret.Text = ""
managename.SetFocus
End If
End Sub
错误在哪里,运行怎么总是显示 管理员姓名错误 请帮我改改,谢谢了