?
Solved

vba to run certain queries in sequence ms access 2003

Posted on 2013-11-21
2
Medium Priority
?
798 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
[X]
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
2 Comments
 
LVL 4

Accepted Solution

by:
AccessGuy1763 earned 2000 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

801 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