Link to home
Start Free TrialLog in
Avatar of Chi Is Current
Chi Is CurrentFlag for United States of America

asked on

Single Set of Double Quotes (") in field value in DLookup Statement = Error 3075

If DLookup("[Product Desc]", "Product Table", "[Product Desc] = " & Chr(34) & Me![ProductDesc] & Chr(34) & " And [Vendor #] = " & Me![cmbVendor]) <> "" Then

When the field value of Me![ProductDesc] contains a single set of double quotes ("), i.e. [1/2" pipe cap], the lookup fails.

Can you suggest a remedy?

Many Thanks, Jacob
ASKER CERTIFIED SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)


Try this:

If DLookup("[Product Desc]", "Product Table", "Replace([Product Desc],Chr(34),"") = " & Chr(34) & Replace(Me![ProductDesc],Chr(34),"") & Chr(34) & " And [Vendor #] = " & Me![cmbVendor]) <> "" Then

mx
Avatar of Chi Is Current

ASKER

Perfect!  Thank you ~ Jacob