Results 1 to 4 of 4
  1. #1
    JJPetersen1 is offline Novice
    Windows 8 Access 2016
    Join Date
    Jan 2020
    Posts
    9

    Filtering a Report

    I have a form with 5 subforms. Each record on the primary form shows a person (AR_ID is the unique ID). Each person is assigned to a Unit (UnitID) which may be shared be many people. Each subform lists POCs assigned to their specific unit. Each subform is linked to the primary form via the UnitID. No problems.

    On top of the primary form I have button, with a command to print a report for that specific person … person info and POC information.

    I’m having difficulty printing the report with the correct information. Here’s what I’m using …

    DoCmd.OpenReport "rptExpandedViewOnePerson", acNormal, , "[UnitID] =" & Forms!frmExpandedView!UnitID

    I know I need to somehow call AR_ID but I don’t know how in my statement. Any help would be appreciated.

  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
    You need to filter on both fields? Along the lines of:

    DoCmd.OpenReport "rptExpandedViewOnePerson", acNormal, , "[UnitID] =" & Forms!frmExpandedView!UnitID & " AND AR_ID = " & Forms!...

    adding the appropriate form reference.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JJPetersen1 is offline Novice
    Windows 8 Access 2016
    Join Date
    Jan 2020
    Posts
    9
    This worked like a "champ." Thank you for your help

  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
    Happy to help and welcome to the site!
    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. Filtering a Report
    By CalvTs in forum Reports
    Replies: 1
    Last Post: 02-18-2014, 11:30 AM
  2. Filtering report
    By huv123 in forum Reports
    Replies: 2
    Last Post: 02-15-2011, 02:59 PM
  3. Report filtering
    By banjo1t in forum Reports
    Replies: 4
    Last Post: 01-26-2011, 06:43 AM
  4. Filtering a Report
    By musicalogist in forum Reports
    Replies: 12
    Last Post: 04-29-2010, 08:36 PM
  5. Filtering my report
    By ldarley in forum Reports
    Replies: 1
    Last Post: 09-05-2008, 09:14 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