Results 1 to 2 of 2
  1. #1
    InspectorHound is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    1

    Passing values to a report from a form in Access 2013

    Hello,



    I have a form that uses a query to display records for a number of people after search criteria is entered. Say for example 10 people are returned to the form. I then have a button that calls a report. The report has its own query. I want to pass the ids of the ten people displayed on the form to the report.

    I can do that when one person is displayed -- take the value of the text box and use it in the where clause of the command calling the report. But how do I do it when ten people are displayed?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Here is one example of selecting multiple parameters for a single field as filter criteria: http://allenbrowne.com/ser-50.html

    And example of building multi-field filter criteria http://www.allenbrowne.com/ser-62.html

    If the form's filter property is set with the parameters by the search operation, then:

    DoCmd.OpenReport "reportname", , , Me.Filter
    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. Passing values to another form
    By jlt199 in forum Forms
    Replies: 11
    Last Post: 02-25-2014, 04:50 PM
  2. Passing multiple values to a second form
    By WithoutPause in forum Forms
    Replies: 39
    Last Post: 02-12-2014, 04:03 PM
  3. Passing Form Values - Deleting Duplicates
    By sonoamore in forum Programming
    Replies: 4
    Last Post: 12-07-2013, 02:09 AM
  4. passing values from form to query
    By gregd in forum Access
    Replies: 6
    Last Post: 05-02-2013, 03:18 PM
  5. Passing Multiple selection values to a report
    By techexpressinc in forum Forms
    Replies: 7
    Last Post: 01-13-2012, 02:27 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