How to use can grow & shrink properties in Ms Access

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc used Ask the Experts™
Hi all;
I’m trying to shrink some controls in Ms Access 2016 which are empty so that only the controls with data must be seen on the payroll summary. I have done the following:
1.      Change label control to text box control so that the property CAN GROW/SHRINK can be applied on both sides.
2.      I have also used this function to hide & unhide the controls depending to whether they contain some data or empty/null, Example  
IIF ((PersonalLevy <> “”),” Personal Levy”, “”)

Open in new window

this code has replaced the label control and is working okay.


The white space still remains, that is what I DO NOT WANT to see, how can I remove it, the white space represents hidden controls. I have put both CAN GROW/SHRINK to YES

Any suggestion to remove it will be highly appreciated.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012
The section's CanGrow/CanShrink must also be set.

 But your going to find it very problematic, especially with multiple columns.   My suggestion would be to use two subreports, one for pay and one for deductions.

 Outside of that, you could go the "un-bound" route, have a row of controls and fill them in as needed as you work down the page.

Senior Developer
Shrink won't work with hidden controls that way.

This is case, when you really want it, then you need to use sub-reports. There are two options:

1) "Normalize your data": Use a continuous report, where each line in the report is a row in the sub report data source.
2) "Group your controls": When the hidden controls form a information group, then place them all on one sub report. Then hide the entire report instead of the controls. In this case Shrink/Grow can be used.

Go for 1). It basically means - and I have written something similar in the past - use report tables, where you store the data you want to print. Thus add two tables (header, details). Where the header contains the time stamp when calculated, then month printed, the total. The details table contains a group column (left or right side or a meaning full name like gross or net), the label to print and the actual value.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial