Here's the last part of a Select statement after the LIKE portion:
SQL = SQL & "' & A1 & A2 & A3 & A4 & A5 & A6 & A7 &"'"
A1 to A7 will analysis each character in the 7 character querystring. I'm using a hyphen in the query to indicate if user wants a wildcard in this position. Ex, *ABC*23, or 1A*C12*, etc. Since a * caused a problem in the input querystring, I cheated and used a - in place of a * within the seven characters. Ex, -ABC-23, or 1A-C12-. I created an if/then statement, Ex,
if left(cc,1) = "-" then
A1 = "'%"
else A1 = '"'
end if
I would insert A1 in this to, but I'm just showing the start of the statemnt with the single and double quote differences
But as you can tell A1 can't handle how I need to label the % " and ' characters in the statement.
How can I get around this. I seem to be going around in circles.
SQL = SQL & "' & A1 & A2 & A3 & A4 & A5 & A6 & A7 &"'"
A1 to A7 will analysis each character in the 7 character querystring. I'm using a hyphen in the query to indicate if user wants a wildcard in this position. Ex, *ABC*23, or 1A*C12*, etc. Since a * caused a problem in the input querystring, I cheated and used a - in place of a * within the seven characters. Ex, -ABC-23, or 1A-C12-. I created an if/then statement, Ex,
if left(cc,1) = "-" then
A1 = "'%"
else A1 = '"'
end if
I would insert A1 in this to, but I'm just showing the start of the statemnt with the single and double quote differences
But as you can tell A1 can't handle how I need to label the % " and ' characters in the statement.
How can I get around this. I seem to be going around in circles.