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

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

on what line youre having an error?..

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.