Can you use a variable for the table name in a select statement?
The following code is working on the server but testing it on my server I get the error:
“(0x80040E14) Syntax error in query. Incomplete query clause.”
The variable “sTBL” is the table name. Am I writing bad code or could it just be that the variable “sTBL” is empty until runtime?
The Code:
sSQL = "SELECT AT_DIN, AT_TransID, AT_Amount FROM "& sTBL &" WHERE AT_DIN = '" & sDIN & "'"