Results 1 to 7 of 7
  1. #1
    edwardcga is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    31

    Sub report linking

    I have a report with a Sub Report linked by an ID. In main report, OFFER_ID linked to Sub Report of the same field. In main report the parameter is a range (e.g FROM ID 1001 TO 1005) but the sub report only returns record of the first ID ie 1001. How can I pass the main report selection to the sub report to select all records with the parameter range inputed in the main report.



    Thanks

    RR

  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,921
    The subreport only shows records that are related to the current record of the main report because of the Master/Child links. That's how the report is designed. If you don't want this dependency then don't set the Master/Child links and instead apply the same filter criteria to the subreport.
    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
    edwardcga is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    31
    Thanks for the advice. I took out the link but I have to type in the parameter 3 times to run the report. Is there a way that I can key in the parameter
    (Between [Enter Start Date] And [Enter end date]). How can I store the parameter and pass it to the sub reports. Currently, the main report and sub report are based on a query for each. Your advice will be much appreciated.

    RR

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Enter the criteria into unbound controls on a form.

    The query parameters reference the controls.

    http://datapigtechnologies.com/flash...mtoreport.html
    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.

  5. #5
    edwardcga is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    31

    Passing parameter to sub report

    Quote Originally Posted by June7 View Post
    Enter the criteria into unbound controls on a form.

    The query parameters reference the controls.

    http://datapigtechnologies.com/flash...mtoreport.html
    Thanks for the advice. I am a novice and in what way I can accomplish this. Create a from, with UNBOUND parameter STARTDATE, ENDDATE. What is the next step and how do I start the report. Please provide steps in achieving this.

    Thanks

    RR

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    What about the tutorial do you not understand?

    Open the report directly from the navigation pane or with code behind a button. Do you use macros or VBA?
    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.

  7. #7
    edwardcga is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    31
    Quote Originally Posted by June7 View Post
    What about the tutorial do you not understand?

    Open the report directly from the navigation pane or with code behind a button. Do you use macros or VBA?
    Thanks. This is a good tutorial. Will follow the example and try. First time using VBA.

    RR

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

Similar Threads

  1. Linking data fr report generation
    By DPCarusone in forum Reports
    Replies: 1
    Last Post: 02-08-2012, 09:30 AM
  2. Replies: 6
    Last Post: 02-06-2012, 03:53 PM
  3. Linking button on form to report
    By robertdudley95 in forum Forms
    Replies: 19
    Last Post: 11-09-2011, 12:14 PM
  4. Problems linking form combo box to report
    By novice2011 in forum Queries
    Replies: 3
    Last Post: 09-08-2011, 03:50 PM
  5. Basic help linking data to a report?
    By SportyDog in forum Reports
    Replies: 3
    Last Post: 11-30-2009, 02:26 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