帮我看看为什么密码用了掩码进不了了
Private Sub Command9_Click()
'定义 connection 对象
Dim cn As ADODB.Connection
'定义 recordset 对象
Dim rs As New ADODB.Recordset
Dim username As String
Dim userpass As String
Dim sql As String
'使用access内置 connection对象
Set cn = CurrentProject.Connection
Text1.SetFocus
username = Text1.Text
Text3.SetFocus
userpass = Text3.Text
sql = "select * from 用户表 where 用户名 ='" & username & "' And " & _
"密码 = '" & userpass & "'"
rs.Open sql, cn
If rs.EOF Then
MsgBox "登录失败"
Text1.SetFocus
Text1.Text = ""
Text3.SetFocus
Text3.Text = ""
Else
DoCmd.Close
DoCmd.OpenForm "鑫马综合信息"
MsgBox "登录成功"
End If
'关闭 recodset 对象和connection对象并释放内存资源
rs.Close
cn.Close
Set rs = Nothing
End Sub
是不是少写了什么?帮我改改!谢谢!