Save a query to a new table

  • Thread starter Thread starter Alistair
  • Start date Start date
A

Alistair

Guest
I wish to run a query and save the results to a new table with a specfic name using a macro.
 
Can a maketable query generate the output table name dynamically?

Is it possible to have a maketable query that generates the table name dynamically? The example would be something like this:

SELECT qryComp.EmplID, qryComp.EmplName, qryComp.MgrName
INTO [=tblMyNewTable & " " & Date()]
FROM qryComp;​

So that, if it worked, the output file would be named: "tblMyNewTable 02/12/2007".

The syntax above gives me a table named: "=tblMyNewTable & " " & Date()"

Thanks in advance for some help with this!
 

Users who are viewing this thread

Back
Top Bottom