We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,313 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Need Urgent help!

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!!!! >.<

3
Contributors
3
Replies
5 Hours
Discussion Span
2 Months Ago
Last Updated
16
Views
mikaichan13
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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

mikaichan13
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

on what line youre having an error?..

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

jhai_salvador
Posting Whiz in Training
226 posts since Mar 2008
Reputation Points: 58
Solved Threads: 39
Skill Endorsements: 2

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.

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0731 seconds using 2.67MB