We help IT Professionals succeed at work.
Get Started

Adodc1 find record

Last Modified: 2012-08-14

Can someone review this code please, I'm not sure were it's gone wrong
While running the code Visual Basic 6, pops up with this message. Run-Time error "91"
object variable or with block  variable not set.

I am hoping I can enter the ID of the customer in a textbox which is named "mSearch.Text" and for it to pop up with the record found displaying the information in another form.

The data is supplied via Microsoft Access  using ODBC.

Private sub Button1_Click

Adodc1.Recordset.Find "Customer_ID = '" & Trim(mSearch.Text) & "' "

If Adodc1.Recordset.EOF Then

     MsgBox "No Records Found... Try Again"
     MsgBox "Records Found"
     load fmcustomer_Details

 End If
end sub
Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE