Keep on getting a Mismatch

atrium

Registered User.
Local time
Tomorrow, 05:23
Joined
May 13, 2014
Messages
348
Code:
strNewRecord = "SELECT * FROM OrdersOnlyQry WHERE Customer Like " * " & [Forms]![OrdersFrm]![SearchSubform].[Form]![SearchCustomerNameFld] & " * ";"

When I execute the above line I keep getting the mismatch error
The field custome on the Qry is string. In the immediate window I can ?[Forms]![OrdersFrm]![SearchSubform].[Form]![SearchCustomerNameFld] and it returns BLINCO exactly as I want

What should I look at the find the problem
 
Code:
strNewRecord = "SELECT * FROM OrdersOnlyQry WHERE Customer Like '*" & [Forms]![OrdersFrm]![SearchSubform].[Form]![SearchCustomerNameFld] & "*';"
 
Thank you arnelgp worked wonderfully

Thanks again👍
 
you're welcome. :)
 

Users who are viewing this thread

Back
Top Bottom