G
Guest
How can I encapsulate a string variable to contain ' and " when using the variable in various lookup routines ? For example, the string "a,a'-Dibromo-o-xylene" makes the variable combo1 unreadable by the DLookup()-function below
code = Nz(DLookup("[CHEMICAL]", "CHEMTABLE", "[PRODID]= '" & combo1 & "'"), 0)
code = Nz(DLookup("[CHEMICAL]", "CHEMTABLE", "[PRODID]= '" & combo1 & "'"), 0)