View Full Version : Access Reports
charlieO
Apr 8, 2005, 07:23 AM
I need to dynamically size a text box in an access report, depending on the value of a field on that line. For some lines it must show the text box and others it mustn't. And it must be able to resize the text box depending on how much text I need to display.
Is this possible in Access and How, if so?
ScottGem
Apr 8, 2005, 09:38 AM
A text box has 2 properties; Can Shrink and Can Grow. If you set these properties to yes, it will automatically change its height (not the width) to fit the amount of text within the control.
You can also set the Visible property of the control based on a value in another control/field. You would do this in the On Format event of the Detail band. Something like:
If Me!othercontrol = x Then
Me!textbox.Visible = True
Else
Me!textbox.Visible = False
End If
charlieO
Apr 11, 2005, 12:56 AM
It does help. Now its just a case of positioning the footer to show / grow at the right place.
Thanks for the help.
A text box has 2 properties; Can Shrink and Can Grow. If you set these properties to yes, it will automatically change its height (not the width) to fit the amount of text within the control.
You can also set the Visible property of the control based on a value in another control/field. You would do this in the On Format event of the Detail band. Something like:
If Me!othercontrol = x Then
Me!textbox.Visible = True
Else
Me!textbox.Visible = False
End If
ScottGem
Apr 11, 2005, 05:23 AM
It does help. Now its just a case of positioning the footer to show / grow at the right place.
Thanks for the help.
Page footers size up from the bootm of each page. Group footers appear at the end of a group. Whenever you set a control within a band to Can Grow, it automatically sets the Can Gro property of the band to Yes.