I want to export and rename a table with the current date to another access db, is this possible?
I have tried the following but this errors saying it doesn't follow access naming rules.
Here is the code
CODE
'rename table to include date
DoCmd.Rename "EAGLE_BACKUP" & "_" & Format(Date, "dd/mmm/yy"), acTable, "EAGLE_BACKUP"
'transfer the data to the eagle backup directory
DoCmd.TransferDatabase acExport, "Microsoft Access", srcfile, acTable, _
"EAGLE_BACKUP" & "_" & Format(Date, "dd/mmm/yy")
DoCmd.Rename "EAGLE_BACKUP" & "_" & Format(Date, "dd/mmm/yy"), acTable, "EAGLE_BACKUP"
'transfer the data to the eagle backup directory
DoCmd.TransferDatabase acExport, "Microsoft Access", srcfile, acTable, _
"EAGLE_BACKUP" & "_" & Format(Date, "dd/mmm/yy")
I would be gratefuil if someone could tell me where I'm going wrong?
Thank-you