Make Table Query / Append Query ???

L

Lisa

I have 3 tables that i need that have some data that is the same. I have
created 3 queries to pull this data.. one of them I do as a make table, then
the other 2 i do as append queries. I created a macro to run each of these
queries in sequence of the make table, then the 2 append queries. Is there a
way to avoid the questions of do you want to delete the existing table, do
you want to append the records.. I am prompted with 6 questions when this
macro runs and I would like it to just do it.

Here is my code:

DoCmd.OpenQuery "QRY_Site Lead Count-Service (Wkld)", acViewNormal, acEdit
DoCmd.OpenQuery "QRY_Site Lead Count - NB (Wkld)", acViewNormal, acEdit
DoCmd.OpenQuery "QRY_Site Lead Counts-Sales (Wkld)", acViewNormal, acEdit
DoCmd.OpenReport "RPT_Compl Evals by Lead", acViewPreview, "", "",
acNormal

thanks.

Lisa
 
D

Dennis

In a Macro, make the first line a SetWarnings with the option of No
then your 3 query lines and then another Setwarnings line with the option of
Yes

In code, put a DoCmd.SetWarnings False at the beginning of your code and
then a DoCmd.SetWarnings True at the end of your code.
 

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