1.11M Members

Need Urgent help!

 
0
 

I'm having trouble with this:

Option Explicit
Dim hold1, hold2 As String
Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    LoginSucceeded = False
    Me.Hide
    Welcome_Scrn.Show
End Sub

Private Sub cmdOK_Click()

With Adodc1.Recordset
hold1 = "[Username] like'" + txtUserName.Text + "'"
hold2 = "[Password] like'" + txtPassword.Text + "'"

       If .EOF <> True Then
       Me.Hide
       Main.Show

    Else
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus

        End If
        End With

End Sub

vb keeps giving me Run time error '91'
Object variable or With block variable not set.
What to doooo!!!! >.<

 
0
 

HELP ME GUYS!!! THIS IS URGENT>>T_T

 
0
 

on what line youre having an error?..

if its on Adodc1.Recordset make sure that your adodc1 is connected and loaded with records.

 
0
 

Try the following...

hold1 = "[Username] like'" + txtUserName.Text + "'"
hold2 = "[Password] like'" + txtPassword.Text + "'"

Set Adodc1.Recordset = hold1 ''Or hold 2, what you want to use...

Your error is referring to your recordset wich is invalid. Use hold1/2 as the recordset.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: