Suppress Access dialog boxes

K

Kirk P.

When I run the statement DoCmd.CopyObject I receive a dialog box asking me if I want to replace the existing table

I ALWAYS the copy to happen, therefore I don't need this dialog box. Is there any way to suppress this message?
 
C

Cheryl Fischer

You can use SetWarnings around your code:

DoCmd.SetWarnings False
'<your code>'
DoCmd.SetWarnings True


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Kirk P. said:
When I run the statement DoCmd.CopyObject I receive a dialog box asking me
if I want to replace the existing table.
I ALWAYS the copy to happen, therefore I don't need this dialog box. Is
there any way to suppress this message?
 
Top