I have a subform on my report that does not apply to all customers. How do I make it invisible and remove the space allowed for it, if it does not apply?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
sub form on a Report
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » sub form on a Report
- This topic has 14 replies, 3 voices, and was last updated 16 years, 1 month ago.
AuthorTopicWSTheresa01
AskWoody LoungerMarch 17, 2009 at 10:22 am #458357Viewing 2 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerMarch 17, 2009 at 10:35 am #1152351I have a subform on my report that does not apply to all customers. How do I make it invisible and remove the space allowed for it, if it does not apply?
Set the Can Shrink property of the subreport control on the main report to Yes, and do the same for the section that contains the subreport.
-
WSTheresa01
AskWoody Lounger -
WSHansV
AskWoody LoungerMarch 17, 2009 at 11:38 am #1152406The subform is in the footer section (QuoteGroupName footer). The properties for the footer and subform are set at Can Grow and Can Shrink. Is there anything else that I should check?
Make sure that Can Shrink has been set to Yes for both the group footer section and the subreport.
There shouldn’t be other controls that overlap horizontally with the subreport control; for example, there shouldn’t be a label next to the subreport. -
WSTheresa01
AskWoody LoungerMarch 17, 2009 at 12:31 pm #1152428Make sure that Can Shrink has been set to Yes for both the group footer section and the subreport.
There shouldn’t be other controls that overlap horizontally with the subreport control; for example, there shouldn’t be a label next to the subreport.I’ve checked and from what you’ve indicated this should be working fine. I took my access class a few years ago and I recall the instructor cautioning us that if when someone (in my case the IT dept) installs the software, they need to make sure that the old version of access is completely wiped away. Could that be the case here? I don’t remember how to check that but could that create a problem with something like this? I have unbound images on the report that randomly appear and disappear when pushing it to an Adobe PDF. My coworker has to do all of the printing because I never know if the logo’s are going to “stick” or not!
Horizonally, the subform goes from margin to margin with nothing next to it at all. There are several subforms both above and below it.
-
WSHansV
AskWoody LoungerMarch 17, 2009 at 12:44 pm #1152433… they need to make sure that the old version of access is completely wiped away. Could that be the case here? I don’t remember how to check that but could that create a problem with something like this?
I don’t think that would cause problems with Can Shrink.
Could you post a stripped down copy of your database? See [post=”401925″]post 401925[/post] for instructions.
-
-
-
-
WSTheresa01
AskWoody Lounger -
WSHansV
AskWoody LoungerMarch 17, 2009 at 4:10 pm #1152491The subforms aren’t really empty – they do display a single record, but the field in some of the subform happens to be blank.
I don’t see the need for all those subforms. You can include the fields in the record source of the main report.
Since you want labels with the text boxes, you need a little bit of code.
See the attached version:I have no idea why the logos wouldn’t appear in a PDF file.
-
WSTheresa01
AskWoody LoungerMarch 23, 2009 at 10:14 am #1153117The subforms aren’t really empty – they do display a single record, but the field in some of the subform happens to be blank.
I don’t see the need for all those subforms. You can include the fields in the record source of the main report.
Since you want labels with the text boxes, you need a little bit of code.
See the attached version:I have no idea why the logos wouldn’t appear in a PDF file.
Thank you for the reply. I wasn’t able to work on this last week. Sorry for the late reply. I hope you get this because I’m not quite sure how this new format works and have not been able to get the email reply to work myself.
I had to add an additional freight term and I’m afraid I must be missing some of the code. I clicked on QuoteGroupName footer, went into the module and pasted what you had on the sample database. Added the additional term that I needed (QtyDiscount) and I’m stuck.
This highlights in yellow:
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)This is what I tried to add:
Me.QtyDiscount.Visible = Not IsNull(Me.QtyDiscount)Is there code somewhere else that I missed? I noticed that your module had (General) and (Declarations) at the top.
I’ve tried to adjust it to that but it keeps reverting back to GroupFooter(0) and Format. -
WSHansV
AskWoody LoungerMarch 24, 2009 at 8:05 am #1153247Have you added a control named QtyDiscount to the group footer? If there is a control bound to QtyDiscount but whose name is different (for example Text37), the code will fail – the code uses the Name property of the control.
And is the name of your group footer GroupFooter0? If it has a different name, you should use that instead of GroupFooter0.
-
WSTheresa01
AskWoody LoungerMarch 26, 2009 at 10:43 am #1153684Have you added a control named QtyDiscount to the group footer? If there is a control bound to QtyDiscount but whose name is different (for example Text37), the code will fail – the code uses the Name property of the control.
And is the name of your group footer GroupFooter0? If it has a different name, you should use that instead of GroupFooter0.
My GroupFooter had a different name and I don’t get an error on QtyDiscount any longer BUT the fields and space allowed for the field don’t disappear when they are left blank. This is so frustrating. I think I have everything set as Can Grow/Can Shrink but I’m definitely missing something!
(I had to put each term on a seperate table so they could track when the terms change and I didn’t know how to do that without breaking them out.)
I’m attaching a new database. Any assistance you can offer will be appreciated.
Thanks,
Theresa -
WSHansV
AskWoody LoungerMarch 26, 2009 at 10:58 am #1153686The name of the group footer *is* GroupFooter0 as you can see by selecting it and looking at the Other tab of the Properties window. So you should use
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
instead of
Private Sub QuoteGroupNameFooter_Format(Cancel As Integer, FormatCount As Integer)
-
WSTheresa01
AskWoody LoungerMarch 26, 2009 at 11:26 am #1153696The name of the group footer *is* GroupFooter0 as you can see by selecting it and looking at the Other tab of the Properties window. So you should use
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
instead of
Private Sub QuoteGroupNameFooter_Format(Cancel As Integer, FormatCount As Integer)
Thank you. It’s working as expected now!
-
WSFrancois
AskWoody LoungerMarch 26, 2009 at 11:06 am #1153691My GroupFooter had a different name and I don’t get an error on QtyDiscount any longer BUT the fields and space allowed for the field don’t disappear when they are left blank. This is so frustrating. I think I have everything set as Can Grow/Can Shrink but I’m definitely missing something!
In addition of Hans’ answer, you should have [Event Procedure] in the On Format event of GoupFooter0. See attachment
-
WSTheresa01
AskWoody Lounger
-
-
-
-
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Privacy and the Real ID
by
Susan Bradley
4 hours, 29 minutes ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
4 hours, 45 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
6 hours, 34 minutes ago -
Upgrading from Win 10
by
WSjcgc50
5 hours, 58 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
17 hours, 55 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
19 hours, 11 minutes ago -
The story of Windows Longhorn
by
Cybertooth
6 hours, 56 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
21 hours, 10 minutes ago -
Are manuals extinct?
by
Susan Bradley
1 hour, 10 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
1 day, 6 hours ago -
Network Issue
by
Casey H
17 hours, 23 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
1 day, 18 hours ago -
May 2025 Office non-Security updates
by
PKCano
1 day, 18 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 20 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
21 hours, 32 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 22 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 22 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
2 days, 6 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
22 hours, 37 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
2 days, 17 hours ago -
How much I spent on the Mac mini
by
Will Fastie
1 hour ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
20 hours, 38 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 23 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day, 18 hours ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days, 18 hours ago -
Powershell version?
by
CWBillow
2 days, 19 hours ago -
SendTom Toys
by
CWBillow
1 day, 6 hours ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 23 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
3 days, 16 hours ago -
How can I install Skype on Windows 7?
by
Help
3 days, 14 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.