I am using both A2003 and A2007.
I am using the statement below as a delete query..
DoCmd.RunSQL "Delete myTable.* from SomeTable where idquote=" & qq & ""
However, I have several tables that I would like to clear depending on other conditions so would like to run the sql statement with the table name as a variable.. I have tried:
Dim Mt as string
MT="SomeTable"
Then inserting MT in place MyTable in the SQL statement. Doesn't work. Do I need some combo of quote, ampersands and apostrophies?
Another problem is with the Where function. Works ok, for number, but can't figure out how to do same thing when qq is a string.
Any help much appreciated