你确定按钮的代码这样写
Dim cmd As New SQLCommand
cmd.ConnectionName = "hk"
cmd.CommandText = "select 密码 From [login] where 登陆账号 = '" & e.Form.Controls("textbox1").value & "'"
Dim str As String = cmd.ExecuteScalar()
str = DecryptText(str,"xuxuemei","win7")
If str = e.Form.Controls("textbox3").Text AndAlso str <> "" Then
MainTable = Tables("login")
e.form.Close
Forms("main").Open
Else
msgbox("密码不正确!",64,"提示")
End If
[此贴子已经被作者于2014-5-5 16:54:16编辑过]