View Full Version : Can Some One Help Me With This Code?


michellerobinso
07-14-2006, 06:35 AM
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.

boblarson
07-26-2006, 01:28 PM
It looks like you are trying to include a whole lot of fields where one is the only thing you can use.

Instead of

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


Try using

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.