1,105,371 Community Members

Need Urgent help!

Member Avatar
mikaichan13
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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!!!! >.<

Member Avatar
mikaichan13
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
jhai_salvador
Posting Whiz in Training
237 posts since Mar 2008
Reputation Points: 48 [?]
Q&As Helped to Solve: 40 [?]
Skill Endorsements: 2 [?]
 
0
 

on what line youre having an error?..

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

Member Avatar
AndreRet
Industrious Poster
4,492 posts since Jan 2008
Reputation Points: 362 [?]
Q&As Helped to Solve: 499 [?]
Skill Endorsements: 24 [?]
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: