Can Some One Help Me With This Code?

michellerobinso

Registered User.
Local time
Today, 11:38
Joined
Jun 14, 2006
Messages
47
rs.FindFirst "[MONTH][YEAR][RETURN NUMBER][ACCOUNT NO][CUSTOMER NAME] = " & Str(Nz(Me![QuickSearch], 0))

I keep getting error

"run time error "13""

type mismatch.

ive tried the help pbut i just dont understand it.
 
It looks like you are trying to include a whole lot of fields where one is the only thing you can use.

Instead of
Code:
rs.FindFirst "[MONTH][YEAR][RETURN NUMBER][ACCOUNT NO][CUSTOMER NAME] = " & Str(Nz(Me![QuickSearch], 0))

Try using
Code:
rs.FindFirst "[ACCOUNT NO] = " & Str(Nz(Me![QuickSearch], 0))

and if you want to search by different fields, I would either just use code to bring up the FIND toolbar button item and let the person enter the info in and the default would be which field their cursor was in when they clicked to find. Or, create a form that you can pop up to enable a selection of what they want to search for.
 

Users who are viewing this thread

Back
Top Bottom