G
Guest
I use a form to create a table called tblImport. If the table already exists
(from previously running the form), I use the DoCmd.DeleteObject acTable to
delete it. If the table does NOT already exist, I get an error message when
the DoCmd is executed. Is there any command that can check if a table
"exists", and then I can skip the delete if it does not.
I need to delete the table if it already exists because when the form
creates the table (it is a link to an excel file), if the table already
exists, it creates a new table and appends a number to the name (tbleImport;
tblImport1 etc.)
I tried the "Where Exists" command, but I am either doing it wrong, or it
is only for subquerries, but I can't get it to work.
I can use an on error resume next but I was hoping for something more elegent.
Thanks for any help.
Gene
(from previously running the form), I use the DoCmd.DeleteObject acTable to
delete it. If the table does NOT already exist, I get an error message when
the DoCmd is executed. Is there any command that can check if a table
"exists", and then I can skip the delete if it does not.
I need to delete the table if it already exists because when the form
creates the table (it is a link to an excel file), if the table already
exists, it creates a new table and appends a number to the name (tbleImport;
tblImport1 etc.)
I tried the "Where Exists" command, but I am either doing it wrong, or it
is only for subquerries, but I can't get it to work.
I can use an on error resume next but I was hoping for something more elegent.
Thanks for any help.
Gene