Rip,
One workaround here would be to put in an OpenQuery action to run a
Make-Table query for each of the tables you want to delete. If the table
already exists, that will be fine. If it doesn't already exist, then it
will now, and thus the DeleteObject will not fail.
Other than that, you can write a VBA procedure/function to test for the
existence of the table. This would work by looping throught the database's
TableDef objects.
--
Steve Schapel, Microsoft Access MVP
"Ripper" <(E-Mail Removed)> wrote in message
news:AD3E06DD-0A24-40E0-8126-(E-Mail Removed)...
> I have a database that I clear out between uses. No need to store
> information from use to use. I use a macro to delete the temorary tables
> that I create from various queries etc. However, I don't always need to
> create all the temp tables, so when I use the macro with the Delete Object
> function I get an Action Failed Error even though I set Warning to false.
>
> How can I set a macro or some process to delete tables that are there and
> skip over the tables that were not created?
> --
> Thanks As Always
> Rip
|