mud2
07-15-2009, 10:39 PM
Seems to me I've been here many times before...
I want to run a SELECT INTO SQL. It contains a WHERE clause which contains a STRCOMP.
The fields it compare are
ID: The field in a table, and
Sfor, a string returned from a combobox.
A working (!!!) clause is
WHERE(((Strcomp(ID,'" & Sfor & "',0)=0)).
These quotes are single, double and double, single
The construction "' & Sfor & "' is cumbersome, and I want to write a function that will redefine Sfor so that I can use the redefined Sfor in the Strcomp, without all the single and double quotes.
Something like Sfor = "'& Sfor & '"
After exhausting the 600 or 700 permutations of Chr(34), Chr(39), " , ', and &'s I give up!
I want to run a SELECT INTO SQL. It contains a WHERE clause which contains a STRCOMP.
The fields it compare are
ID: The field in a table, and
Sfor, a string returned from a combobox.
A working (!!!) clause is
WHERE(((Strcomp(ID,'" & Sfor & "',0)=0)).
These quotes are single, double and double, single
The construction "' & Sfor & "' is cumbersome, and I want to write a function that will redefine Sfor so that I can use the redefined Sfor in the Strcomp, without all the single and double quotes.
Something like Sfor = "'& Sfor & '"
After exhausting the 600 or 700 permutations of Chr(34), Chr(39), " , ', and &'s I give up!