Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Can Shrink on Reports
William Dowler 
      
6 years ago
Richard,
I have several sub total fields on a report, each on a separate line. Two of these fields may be $0. I have set the CanShrink and CanGrow properties to "Yes" on both fields. The first field becomes invisible when = $0 but the second field doesn't! Any ideas?
e.g.
Sales Tax: $158.88
Discount: $200 (shrink field that disappears if $0)
Invoice Total: $4,206.88
Pre-Paid Amount: $0 (shrink field, doesn't disappear)
Amount Due: $4,206.88

Richard Rost  @Reply  
          
6 years ago
Do you have labels next to them? Remember, labels don't shrink. I cover this in the class that deals with Can Shrink in reports. Access Expert 9, I think.
William Dowler OP  @Reply  
      
6 years ago
I do have labels, but there is a label next to Discount and that shrinks no problem. Curious!!
Richard Rost  @Reply  
          
6 years ago
It will turn invisible if you make the attached text box invisible, but it won't shrink. Remove ALL of the labels just to test it and you'll see if that's the culprit.
William Dowler OP  @Reply  
      
6 years ago
Richard,
That's what I find curious. It does make the Discount label invisible and it does shrink and move the rest of the totals up, perfect, no problem, but the second one (Pre-PaidAmount) doesn't work.
William Dowler OP  @Reply  
      
6 years ago
Richard,
OK, I added this to the ON GOT FOCUS event of the Report:
   If Me!DiscountTotal  0 Then
      Me!DiscountTotal.Visible = True
   Else
      Me!DiscountTotal.Visible = False
   End If
      If Me!PrePaidAmount  0 Then
      Me!PrePaidAmount.Visible = True
   Else
      Me!PrePaidAmount.Visible = False
   End If
The CanShrink property is set to "Yes" on both the fields and the Detail section of the report.
The labels now disappear and both the sub totals move up, filling the blank lines.
This threw me because everywhere I looked it was stated that Labels will NOT shrink.... but they apparently do!!!
Did Microsoft change something and not tell us? Many thanks....... Bill D.
Richard Rost  @Reply  
          
6 years ago
It's possible. They make little changes all the time just to annoy me. :)  Since you made them not visible, they probably don't affect the height of the section. One thing, move your code from the On Got Focus to the BUILD EVENT of the SECTION (right click on the section header, Build Event). That will put the code in the Format event of the section, which is where you want it. Also, you don't need all the Me's.
William Dowler OP  @Reply  
      
6 years ago
Richard,
OK, moved using the Build Event on the Detail Section and that works fine.
I like the Me's, it's all about Me didn't you know that? :-)
Richard Rost  @Reply  
          
6 years ago
Haha. Yes, of course. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 12:00:35 PM. PLT: 1s