Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "对不起,用户名与密码不能为空", vbInformation, "输入错误"
Exit Sub
End If
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序设计\人事管理.mdb;Persist Security Info=False"conn.Open
rs.Open "select * from 密码表 where 用户名='" & Text1.Text & "' and 密码='" & Text2.Text & "'", conn, 3, 3If rs.RecordCount <> 0 Then
Load Form2
Form2.Show
Unload Me
Else
MsgBox "对不起,用户或密码错误"
End If第一次密码输入错误的时候是正常的,但是第2次输入错误密码的时候就出错
提示的是"对象打开时,不允许操作"
错误代码是conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序设计\人事管理.mdb;Persist Security Info=False"
怎么解决啊