Results 1 to 4 of 4
  1. #1
    pinecrest515 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    31

    Help!! VB Code to run multiple queries in sequence in Access

    Hi,



    I am relatively new to VB on MS Access, and would like to consult forumers on a problem I am facing.

    I developed a series of SQL queries, where, when run sequentially, will get me what I want. However, my client demands something simliar, where she can just click one button and get the results from running multiple queries.

    Question: How can I construct a program (VB?) that allows multiple SQL queries to run sequentially on MS Access? One of the SQL queries prompts an input parameter.

    I really don't know how to use VB to program on Access, so any pointers, instructions, and syntax help will be great!

    Thank you in advance!

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    To what types of queries are you referring: SELECT, Update, Append, Delete?

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by jzwp11 View Post
    To what types of queries are you referring: SELECT, Update, Append, Delete?
    UNIONS!

  4. #4
    zyltar is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6
    Hi,

    The command to run queries which exist in the front en is
    Code:
    docmd.openquery("queryname")
    If you don't want to have the confirmation box for action queries
    put before

    Code:
    docmd.setwarnings false
    docmd.openquery("queryname")
    docmd.setwarnings true
    Hope it helps.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  2. Sums of Multiple Queries
    By flsticks in forum Queries
    Replies: 5
    Last Post: 09-16-2010, 09:32 AM
  3. Run queries in sequence and combo box
    By thart21 in forum Queries
    Replies: 10
    Last Post: 05-28-2010, 03:47 PM
  4. Recordsource with Multiple queries
    By darshita in forum Programming
    Replies: 1
    Last Post: 08-10-2009, 03:17 PM
  5. Help writing multiple queries
    By wz72n01 in forum Queries
    Replies: 1
    Last Post: 05-24-2009, 12:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums