-
June 22nd, 2009, 07:08 AM
#1
VB6 Runtime Error 91
I'm doing a coursework project using Visual Basic 6, and I simply can't get the Login form to work. On my tutpor's reccomendation, I'm using an Adodc controller with the Jet 4.0 engine to connect to a database containing usernames, passwords and access levels for users. The connection works fine and I've tested it out, but I'm getting Runtime Error 91 every time I run the Logon form. Here's the code I'm using:
Code:
Private Sub Cancel_Button_Click()
Unload Me
End Sub
Private Sub Login_Button_Click()
'Runtime 91 Error happens on the Line Below
If (Adodc1.Recordset(0) = txtUserName.Text And Adodc1.Recordset(1) = txtPassword.Text) Then
frmRolfs.Show
Unload Me
Else
msgError.Caption = "Username or Password Incorrect"
End If
End Sub
Any advice would be appreciated!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|