Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

vba to run certain queries in sequence ms access 2003

Posted on 2013-11-21
2
773 Views
Last Modified: 2013-11-22
Hi Expert's

I need a macro in ms access 2003 to run in total 10 different queries in a sequence. ..and I have no idea on how to write the vba...

most of the qry are select and append queries..

I am looking create a button on a userform to complete the task.
0
Comment
Question by:route217
2 Comments
 
LVL 4

Accepted Solution

by:
AccessGuy1763 earned 500 total points
ID: 39666172
Do you need to display the queries in any way?  The simplest way would be something like this:

Private Sub cmdMyButton_Click()

   'Optional turn warnings off
   docmd.setwarnings false

   'Run 10 queries
   docmd.runsql "yourQueryName1"
   docmd.runsql "yourQueryName2"
   docmd.runsql "yourQueryName3"
   ...

   'Optional turn warnings back on
   docmd.setwarnings true

End Sub

Open in new window

0
 

Author Comment

by:route217
ID: 39666621
Thank for the feedback experts...

let me test.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

837 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