How are text lables shrunk in line with their controls?

  • Thread starter Thread starter Frank Martin
  • Start date Start date
F

Frank Martin

We have Access2000 with WindowsXP.



We have produced a report to print out many pages of customer & supplier
addresses.



We use the "can shrink" property to shrink (and so delete on the report)
phone/fax and other details out when these are not available.



Some fields have the text labels attached but these do not shrink when the
control is empty.



How can we tell the label to shrink when the control does?



Please help, Frank
 
Frank said:
We have Access2000 with WindowsXP.

We have produced a report to print out many pages of customer & supplier
addresses.

We use the "can shrink" property to shrink (and so delete on the report)
phone/fax and other details out when these are not available.

Some fields have the text labels attached but these do not shrink when the
control is empty.

How can we tell the label to shrink when the control does?


Use VBA code in the control's section Format event:

Me.thelabel.Visible = Not IsNull(thetextbox)
 
A non-code method is to change the labels to text boxes with control sources
like:
="Fax " + [FaxNumber]
Set the text box to can shrink and can't grow. Only display the text "Fax".
If the field is null, then nothing will show in the text box.
 
Thank you for the replies.

We have tried your VBA code method which works very well.
 
Back
Top