I am writing some VBA to import data from an excel file. The seudo code looks like:
Copy "tablename" table to "tablename-backup"
Delete contents of "tablename"
Import contents of Excel file into the blank "tablename"
To run the backup I am using DoCmd.CopyObject, "tablename-backup", acTable, "tablename"
Works great on initial run but once the table is created I am getting a "Do you want to overwrite" dialog pop up box on subsequent runs.
How can I write the code for:
IF dialog popup box, slecet "Yes"?
Thanks!