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?
 

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