Macros and Conditionals

G

Guest

I have a macro that does the following... msg box, import table (enter date),
append imported table to existing table, delete the imported table, msg box.
In the event someone starts the macro but didn't mean to, at the point where
they enter the date for the append query, they can click cancel which will
halt the macro. Problem is, that leave the imported table. I tried deleting
the table first, but if the table doesn't exist because the last macro run
was complete and successful, I get a error and the macro halts.
I'm sure a condional in the macro is the answer for me, but I can't find any
real help in my books. Ideally, my conditional would say "if temporary
imported table exists, then action delete it". Can anyone tell me how to
write a conditional in a macro that says "If table exists". Thx, Dj
 
G

Guest

you can create a new macro that deletes a table

your only question is when/what should trigger that macro.... you might be
able to use that same cancel button...or maybe create a second "Are you
sure?" button as an excuse to have a second clickable event to use...

you could use the exit event....

you have several options to play with....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top