Results 1 to 8 of 8
  1. #1
    Topflite66 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    87

    Linked reports with criteria

    I have two linked reports that are generated from two separate queries. I also have criteria asking for the year. In order to get the link on the first report to correctly open the second report I need to re-enter the criteria from the first report. Is there a way to have Access remember the criteria i entered initially and carry forward to the linked report? TIA

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Most of us use forms to gather user input. It gives you more control and would solve this issue.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Topflite66 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    87
    Thank you for responding so quickly. I'm not familiar with that as I'm a beginner but is this what you are referencing:

    https://www.oreilly.com/library/view...7/ch01s02.html

    Thank you.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    That link doesn't work for me. Basically you'd have a form with a button and a textbox. The user would enter the year in the textbox and the button would open the report. Instead of criteria like [Enter year] in the query, you'd have

    Forms!FormName.TextboxName

    Using a form gives you the ability to validate what the user entered in the textbox before opening the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Topflite66 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    87
    Odd that you weren't able to open the link I posted. Maybe this one will work. I believe this is what you are referencing but just want to make sure. Thanks again

    https://www.oreilly.com/library/view/access-cookbook/0596000847/ch01s02.html

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes, except I would never open a query directly for the user, only a form or report that was based on the query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Topflite66 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    87
    Quote Originally Posted by pbaldy View Post
    Yes, except I would never open a query directly for the user, only a form or report that was based on the query.
    Perfect. Thank you for the help and the advice.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem, post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 12-12-2013, 02:13 PM
  2. Replies: 2
    Last Post: 07-30-2012, 09:49 AM
  3. Replies: 1
    Last Post: 05-23-2012, 12:08 PM
  4. Query criteria in linked table
    By kjlogue in forum Queries
    Replies: 2
    Last Post: 10-06-2011, 11:56 AM
  5. Print linked pdfs with their associated reports
    By HoopaWildlife in forum Access
    Replies: 1
    Last Post: 09-08-2011, 06:40 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