How do I stop Access from asking confirmation to delete a table in a Make-Table Query?

M

Mike Webb

Using Access 2002.

My startup form has a macro attached to run a Make-Table Query. I am unable
to figure out how to tell Access to stop asking me for
confirmation/permission to delete the table this query makes (from previous
running of the macro) so it can then create a new one. I've unchecked the 3
Confirm Edit checkboxes on the Edit/Change tab of the Options window. What
am I missing?

TIA,
Mike
 
G

Guest

Add the following two steps - one before and other after
the make table. This turns off all safety measures.

SetWarnings The arguement defaults to No.

SetWarnings Change the default to Yes.
 
J

John Vinson

Using Access 2002.

My startup form has a macro attached to run a Make-Table Query. I am unable
to figure out how to tell Access to stop asking me for
confirmation/permission to delete the table this query makes (from previous
running of the macro) so it can then create a new one. I've unchecked the 3
Confirm Edit checkboxes on the Edit/Change tab of the Options window. What
am I missing?

The short answer is that you can put a line

SetWarnings False

before running the macro step which deletes the table and runs the
maketable query; BE SURE to put

SetWarnings True

after the queries run, or you'll turn off ALL warning messages for the
rest of the Access session!

The long answer is: WHY are you running make-table queries AT ALL? If
you just create a Select query which returns the same record, you can
use it as the recordsource for a Form or a Report; you can export it;
you can base another query on it; you can do just about anything that
you can do with a Table, without the bloat and inefficiency of a
make-table query. Is it really necessary to do this at all?
 
Top