Microsoft Office Tutorials and References
In Depth Information
Displaying Empty or Long Fields
Displaying Empty or Long Fields
Short Text and Long Text fields can pose problems in reports because they
can contain one character or hundreds of characters. Anticipating how
much space to leave for them is hard. Luckily, Access has some features that
help you deal with long fields.
Book V
Chapter 1
Displaying long text
If a Short Text or Long Text field in your report contains more than a
few words, you may want the field to wrap onto additional lines. The
Description field in a Products table may contain a whole paragraph
about the product. You could display the field in a very large text box
control that can fit the largest description in the table, but Access would leave
a large empty space in the report after short descriptions. Instead, each text
box can expand or shrink vertically to fit the amount of text in the field for
each record.
To make a text box grow, start by making it big enough to fit just one line of
text. (See Book IV, Chapter 2 for details on making a text box control.)
Display its property sheet by clicking the Property Sheet button in the Tools
group on the Design tab of the Ribbon. Then set its Can Grow property
(which is on the Format tab, a long way down the list of properties) to Yes.
When Access prints each record, the text box control expands until the
entire value of the field fits. The remaining controls move down the page.
When you set a control’s Can Grow property to Yes, Access sets the Can
Grow property for the section that contains the property, too. When Access
prints the report, the section expands as well as the control, so nothing
gets cut off. If you don’t want the section to expand, you can change its Can
Grow property back to No to omit information that doesn’t fit in the section.
Set the Can Grow property to No when you’re printing forms of a
predetermined size, such as mailing labels. (In Chapter 2 of this minibook, we show
you how to set up a report that prints mailing labels.)
Displaying fields that may be empty
To avoid leaving blank lines when a field is blank, set the Can Shrink
property for the text box to Yes. (This setting is on the Format tab of the
property sheet, just below the Can Grow property.) Many address lists, for
example, are stored in tables that have two lines for the street address. If the
second line is empty, the mailing label looks better if the City/State/Zip line
prints right below the first address line with no gap.
To make a text box control that shrinks when the value is blank, make the
text box big enough to fit the longest value in the table; then set its Can
Shrink property to Yes. When printing the report, Access omits the control
if the field’s value is blank.
 
Search JabSto ::




Custom Search