Results 1 to 3 of 3
  1. #1
    Dave D is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    45

    dynamically add a subreport to a main report


    Is it possible to have a main report and then, using VBA, dynamically add different sub-reports to the main report based on differing conditions?

    If not, is it possible to dynamically move the positions of the sub-reports on the main report (based on which sub-reports don't have data and won't show in Preview mode)? I tried changing the sub-report.Top attribute using VBA but received an error stating the attribute isn't accessible using VBA.

    Thanks.

  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,960
    None that I know of.

    My solution was to have a label display when the subreport has no data
    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
    Dave D is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    45
    I have 4 sub-reports on the main report. My boss wants certain spacing on between the sub-reports. I can throw in the label to display if no data is present, but that messes up the spacing.

    I'll play around with opening the report up in design mode, moving sub-reports on the form with VBA, and then displaying the form. I'm not sure it will work but it's my last alternative.

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

Similar Threads

  1. Conditional value from subreport to main report?
    By aellistechsupport in forum Reports
    Replies: 4
    Last Post: 06-10-2014, 02:08 PM
  2. Replies: 1
    Last Post: 04-15-2013, 10:02 AM
  3. Subreport with criteria from main report
    By Evilferret in forum Reports
    Replies: 1
    Last Post: 08-15-2012, 03:19 PM
  4. Replies: 3
    Last Post: 06-15-2012, 11:14 AM
  5. Combine Main Report with subreport
    By jortizz in forum Reports
    Replies: 2
    Last Post: 05-05-2011, 12:42 PM

Tags for this Thread

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