Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CopyObject without overwrite prompts

Status
Not open for further replies.

madkowrmd

Programmer
Apr 12, 2001
2
US
I am trying to use CopyObject in code to transfer various objects from one db to another. However many of the have the same name and I am prompted if I wish to overwrite the existing file.
Is there any way to bypass these prompts so I can then copy multiple objects without having to have user intervention?

Thank you,
Shane Fischer
Data Warehouse Programmer/Analyst
Paterno Imports
fischersc@paternoimports.com
 
You might try using the setWarnings method.
Code:
DoCmd.SetWarnings False
'your code
DoCmd.SetWarnings True
I think that will stop them. -Dustin
Rom 8:28
 
I forgot to mention.. there are a few warnings you should read before doing this. Look up "SetWarnings Method" in the help file and read the warnings first. -Dustin
Rom 8:28
 
Thank you very much that worked...


"And we know that in all things God works for the good of those who love him, who have been called according to his purpose."

:) Thank you brother..

Shane Fischer
Data Warehouse Programmer/Analyst
Paterno Imports
fischersc@paternoimports.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top