By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,477 Members | 1,602 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,477 IT Pros & Developers. It's quick & easy.

append queries in VBA

P: 4
Hello All,
I have several append queries that populate the same table from different tables which I run several times per week.
Right now I do them through the query setup wizard but I want to automate them using VBA Script.
How can I do this??
Each time I run them, the destination table is/should always be empty before I begin.

Thanks!!!
Twiggymoo
Mar 9 '08 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,597
Hello All,
I have several append queries that populate the same table from different tables which I run several times per week.
Right now I do them through the query setup wizard but I want to automate them using VBA Script.
How can I do this??
Each time I run them, the destination table is/should always be empty before I begin.

Thanks!!!
Twiggymoo
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SetWarnings False
  2.   DoCmd.RunSQL "Delete * From <Destination Table>;"
  3.   DoCmd.RunSQL "<Append Query SQL to populate Destination Table>;"
  4. DoCmd.SetWarnings
Mar 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.