Make table query

F

Fab

I have a make table query. Is there a way to dynamically name the table.

here is an exmaple of thw file name i want.

Table1_"current date"

i.e. Table1_Jul/12/2005

so in other words tablename and append the date it was runned?

Thanks
 
K

KARL DEWEY

Why not just use an append query and add a date field to identify when the
records were created.
 
J

Joe D

One way to do this is to make the maketable table name something like
"Table1_Current", then copy the table to the name you want:

DoCmd.OpenQuery "MyQuery"
DoCmd.CopyObject, "Table1_" & Format(Date,"mmddyyyy"),acTable,"Table1_Current"

....where MyQuery is your query name (replace with your own name) and format
the date as you like.

I have an aversion to putting special characters like "/" in object names.

HTH
 
Top