Go Back   Access World Forums > Microsoft Access Discussion > Reports

Thread Tools Rate Thread Display Modes
Old 10-12-2018, 04:55 PM   #1
Newly Registered User
Join Date: Oct 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
JCapp is on a distinguished road
Creating a VBA Subreport in Access

Good evening all,
I am new to using VBA in Access and have been tasked with creating updates for a tool at work. They want as much as possible to be based on VBA code due to the size of the tool/database we're working with.
I have a main report that displays the top 25 systems based off of a group number variable. I have another report that displays the top 25 part numbers that all belong to a certain group number. What I need to do is create a Subreport in VBA code for when the Group Report loads (on load) for the part numbers Report to be listed under their corresponding group number.
I know how to insert the subreport and all of that inside access itself and it works beautifully, but that's not what they're looking for. I also need to create a little plus thingy (very technical term) in the top left corner of the subreport to collapse or expand it, but I can manage that.....I think haha. Thanks for any input you guys can provide.

JCapp is offline   Reply With Quote
Old 10-12-2018, 06:04 PM   #2
Have been here a while
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,352
Thanks: 2
Thanked 1,971 Times in 1,927 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Creating a VBA Subreport in Access

Originally Posted by JCapp View Post
..They want as much as possible to be based on VBA code due to the size of the tool/database we're working with.
I can't follow that statement, why do they think a lot of VBA code should reduce the database size versus an already created report?
What really increases a database in size, is if images are stored direct in a MS-Access database, or if queries are run where many data are involved, that really bloat a MS-Access database, (therefore remember to do a Compact & Repair).
Remember a report is more a static view of data, (printed on paper), I you want something to expand/collapse then use a form.
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force a page break in 1st subreport based on info in 2nd or 3rd subreport SallyJenkins Reports 0 02-19-2013 10:32 AM
HasData check in subReport within subreport on mainreport tfin Reports 2 06-25-2009 10:14 PM
Text Box on report, needs to show value on subreport, even if subreport not there ! Davepacey Reports 4 06-23-2003 10:20 AM
Need help creating a report with a crosstab report as a subreport Kenneth Reports 0 05-31-2000 03:05 AM

All times are GMT -8. The time now is 05:46 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World