Run Time error 3464

cc.caroline15

Registered User.
Local time
Yesterday, 20:23
Joined
Oct 23, 2014
Messages
23
Hello everyone on my database I have a form named frmGoToRecordDialog when I select a customer and click show record it should open frmCustomers on that record of the customer selected but instead I get run time error 3464 data type mismatch in criteria expression. Can anyone please help me? thank you
 

Attachments

...when I select a customer and click show record it should open frmCustomers on that record of the customer selected but instead I get run time error 3464 data type mismatch in criteria expression. Can anyone please help me? thank you

Remove the 2 single quotes marked by red.

Code:
rstCust.FindFirst "fldCustomerID = [COLOR=Red][B]'[/B][/COLOR]" & lstFindCus & "[B][COLOR=Red]'[/COLOR][/B]"
Correct is:
Code:
rstCust.FindFirst "fldCustomerID = " & lstFindCus
 
Thank you so much!! never imagined those quotes were the cause of the problem..!!
Remove the 2 single quotes marked by red.

Code:
rstCust.FindFirst "fldCustomerID = [COLOR=red][B]'[/B][/COLOR]" & lstFindCus & "[B][COLOR=red]'[/COLOR][/B]"
Correct is:
Code:
rstCust.FindFirst "fldCustomerID = " & lstFindCus
 
That is what "3464 data type mismatch" means!
The "fldCustomerID" is a number type field and with the 2 single quotes around the "lstFindCus", it gets as string.
 

Users who are viewing this thread

Back
Top Bottom