Solved

overwrite a table without confirm to an external MDB

Posted on 2004-08-05
4
614 Views
Last Modified: 2010-07-27
I want to export, with a macro or code, a few tables or make table queries to an external MDB.

If I do a make table query or macro CopyObject or code DoCmd.CopyObject to make or copy a table to external mdb and the table exists in the external mdb I get a 'already exists, overwrite?' confirmation.  I don't want to see these confirmation.
 
Is there a way to override this? I can delete a table using code within the current db without confirmation, in order to then recreate it in current db so don't get this message. But can't seem to do same in an external db.

tx,

Luke
0
Comment
Question by:LukeB
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:dannywareham
ID: 11724925
I think you can setwarnings to false for this...
0
 
LVL 1

Author Comment

by:LukeB
ID: 11725885
ok, in the macro (and how) or in code (and how) ?
0
 
LVL 26

Accepted Solution

by:
dannywareham earned 175 total points
ID: 11726082
Either
In marco (setwarnings then in bottom window put No) - it's in the dropdown list

In code
DoCmd.SetWarnings (False)

Using a macro is probably easier if you're unsure of coding. (and its dead simple)
At the end of the macro, put setwarnings to yes though
0
 
LVL 1

Author Comment

by:LukeB
ID: 11733083
Hi Danny,

perfect, thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now