Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    19

    Unanswered: SQL Query to trigger other queries

    Sorry for the bad title but it's as clear a title as what I could think of.

    I need to create a query (Called "Report") that will trigger 3 queries.

    Query #1 (Delete Query) Report_Reset
    Query #2 (Append Query) Report_Populate
    Query #3 (Select Query) Report_Call_Up

    I have no clue where to get started.

    HELP PLEASE!

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    A query in Access can only perform a single task. You'd have to use VBA code or a macro to run the first 2 queries before opening the form/report using the 3rd. Is there a reason you delete/append/select rather than just selecting?
    Paul

  3. #3
    Join Date
    Oct 2011
    Posts
    19
    I have a query with an embedded subquery, this means that access is preventing me from running footer SUMs and COUNT (error:"Multi-Level GROUP By Clause is not allowed in subquery"), so I'm dumping the data to a temporary table (with the append query) and then selecting the data from there for the report (select query) but before I can do that I have to ensure the temporary table is empty (delete query). It's working great I'd just love to be able to do it with a single click rather then have to send the user through all those steps.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Like I said, you can use VBA or a macro. Basically

    OpenQuery
    OpenQuery
    OpenReport
    Paul

  5. #5
    Join Date
    Oct 2011
    Posts
    19
    thanks that worked perfectly

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help.
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •