I am having trouble getting this SQL code to work. It is saying expected end of sentence:: the cursor is hightlighting the comma after Dynamic query.
Any ideas?
If tblname1 <> "" Then
Set QD = ("Dynamic_Query", "SELECT * FROM "& tblname1 & " " & where)
Else
Set QD = ("Dynamic_Query", "SELECT * FROM " & tblname1 & " " & where)
End If