Help! I'm a newbie to MS Access 2010 and have been running SQL script which successfully defines and sets a string variable, but then fails to use that variable in a DoCmd.RunSQL statement.
I have created a table called PARAMS and within that Table a field called Account. The statement is as follows
DoCmd.RunSQL "INSERT INTO PARAMS ([account]) values (myfilename ) "
I am invited to enter a parameter value for myfilename despite that variable having been populated with the string "BAT" by previous code
I have also tried to use the following statement
DoCmd.RunSQL "INSERT INTO PARAMS ([account]) select (" & MyFilename & " ) "
but again I am invited enter a parameter value
Help!!!!!