Results 1 to 4 of 4
  1. #1
    robertedmundwalker is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    2

    How to generate two reports from one query

    Hello forum. I am new to access. I am trying to generate two reports from one instance of a query.
    My Table has three record Columns. ID (access generated key) Question and Answer.
    My Query pulls 10 random records from the table.
    My first Report displays the [ID], [Question] and [Answer]<- (not visible) of the 10 random records
    My second report "should" display the answer for each of the 10 random records generated by the Query (to serve as an answer key). Instead it runs the Query again and show 10 answers that do not match the first query.
    I have tried setting the data source for the second Report [Answer] to the first Report [Answer], but this gives me the same thing 10 times (last record the Query produced) from the first Report.


    I thought I should be able to produce two Reports (with different Columns from a Record on each) from one instance of running a Query.
    Any help would be appreciated.

    Robert

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    That's the nature of randomizing. You run report and get random records. Each report runs their own instance of the query.

    A solution will likely involve writing records to a 'temp' table and that table is used as source for reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    robertedmundwalker is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    2
    Thank you June7. After reading you reply I looked up how to change a SELECT Query (that I already had) to a MAKE TABLE Query and linked my multiple reports needed to the new table name that is created.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    My preference would be to use a 'temp' table - table is permanent and records are temporary. DELETE records from table at beginning of procedure, INSERT new records. If db is multi-user split design, the temp table would be in the frontend so users will not conflict.

    Continually creating and deleting tables is changing db design. Recommend avoid procedure that programmatically changes db design.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Using reports to generate postcards
    By csmith in forum Reports
    Replies: 2
    Last Post: 09-10-2016, 05:28 PM
  2. Replies: 7
    Last Post: 09-27-2014, 09:11 PM
  3. Replies: 6
    Last Post: 03-19-2014, 03:53 PM
  4. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  5. Replies: 1
    Last Post: 03-11-2006, 07:38 AM

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