Find value in other form

  • Thread starter Thread starter Lars Brownie
  • Start date Start date
L

Lars Brownie

From FormB I'm trying to use FindFirst to find a record in FormA:

Forms![FormA].Recordset.FindFirst "ID_car = " & fldQuickSearch

I get a 'missing operator' error. Can someone explain what I'm doing wrong?

Thanks, Lars
 
From FormB I'm trying to use FindFirst to find a record in FormA:

Forms![FormA].Recordset.FindFirst "ID_car = " & fldQuickSearch

I get a 'missing operator' error. Can someone explain what I'm doing wrong?

Thanks, Lars

Step through the code and see what the value of fldQuickSearch is at this
point. You'll get that error if it's a NULL Variant.

If ID_Car is a Text field you need some quote delimiters - I wouldn't expect
that to give this particular error but if it's the case try

"ID_Car = '" & fldQuickSearch & "'"


Spaced out for readability that's

"ID_Car = ' " & fldQuickSearch & " ' "
 
Thanks John!
Indeed I used the wrong field: fldQuickSearch. Got it working now.

Lars

John W. Vinson said:
From FormB I'm trying to use FindFirst to find a record in FormA:

Forms![FormA].Recordset.FindFirst "ID_car = " & fldQuickSearch

I get a 'missing operator' error. Can someone explain what I'm doing
wrong?

Thanks, Lars

Step through the code and see what the value of fldQuickSearch is at this
point. You'll get that error if it's a NULL Variant.

If ID_Car is a Text field you need some quote delimiters - I wouldn't
expect
that to give this particular error but if it's the case try

"ID_Car = '" & fldQuickSearch & "'"


Spaced out for readability that's

"ID_Car = ' " & fldQuickSearch & " ' "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top