flaniganmj
Technical User
This should be easy, but I couldn't find the answer in any of the old threads. I have have a function that is called with x number of variables, some of which are strings. I create an SQL statement string to run in the command:
DoCmd.RunSQL mySQL
The SQL is for an append query, so "INSERT INTO"..."SELECT" blah blah. But when I use the string variable:
myVariable & " AS Exp1, " & _
to build the SQL string, it doesn't recognize the variable string. So:
myVariable AS Exp1,
instead of
"myVaribale" AS Exp1
I've tried using Chr(147) or using (') around each of the variables, with no sucess with either though. Maybe I am approaching this wrong. Any help or suggestions will do.
DoCmd.RunSQL mySQL
The SQL is for an append query, so "INSERT INTO"..."SELECT" blah blah. But when I use the string variable:
myVariable & " AS Exp1, " & _
to build the SQL string, it doesn't recognize the variable string. So:
myVariable AS Exp1,
instead of
"myVaribale" AS Exp1
I've tried using Chr(147) or using (') around each of the variables, with no sucess with either though. Maybe I am approaching this wrong. Any help or suggestions will do.