STOP Delete existing table confirmation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to stop the confirmation message that asks if you really
want to delete the existing table when re-running a make table query? When I
have 30 queries in a macro and you have to make 30 confirmations to delete
the tables before they are re-generated, somewhat annoying.

Am able to stop all of the other confirmation messages appearing from
Tools>Options?Edit/Find. Am Running Access 2003.

Thanks
 
Andy said:
Is there any way to stop the confirmation message that asks if you really
want to delete the existing table when re-running a make table query? When I
have 30 queries in a macro and you have to make 30 confirmations to delete
the tables before they are re-generated, somewhat annoying.

Am able to stop all of the other confirmation messages appearing from
Tools>Options?Edit/Find. Am Running Access 2003.

Thanks
I am not sure if marcos are the same as form coding but for the latter
here is what you do.

DoCmd.Setwarning False
Do you stuff here
DoCmd.Setwarning true

IMPORTANT NOTE. If you fail to turn the warnings back on, all other
warnings will be suppressed. With this said I recommend error trapping
such as

on error goto Err_trap

your code

DoCmd.Setwarning False
Do you stuff here
DoCmd.Setwarning true

Err_trap_exit:
DoCmd.SetWarning True

Err_trap:
Some code here
resume Err_trap_exit
 
Use SetWarnings Macro action (No for Warnings On argument) at the beginning
of your Macro and (may not be necessary) use the same with Yes for Warnings
On argument at the end of your Macro.
 
Back
Top