totn Access

MS Access 2003: Dynamically size report object

This MSAccess tutorial explains how to dynamically size a report object in Access 2003 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2003/XP/2000/97, I've created a report. In this report, I have a text box object that could return a value that has a small number of characters or it could have a large value in it. I don't want to create the text box object too big on the report in case the value that it returns is very small. It would look silly to have all of the blank lines. Is there a way that I can dynamically size this text box?

Answer: In Access, you can dynamically size a report object.

To do this, open your report in design view. Right-click on the report object that you wish to dynamically size.

In this example, we are going to dynamically resize the text box called Description.

Microsoft Access

When the Properties window appears, set the "Can Grow" property to "Yes. By setting the "Can Grow" property to "Yes, the Description will grow vertically to fit all of the data.

Let's look at a report to demonstrate the "Can Grow" property.

If the "Can Grow" property is set to "No" and the Description text box has a very long value, the report would look like this:

Microsoft Access

As you can see, the Description field has been cut off because the value is too long.

If we set the "Can Grow" property to "Yes" on the Description text box, the example report would look like this:

Microsoft Access

Now, the Description is wrapping the text to "fit". It will grow as large vertically as it needs to fit all of the data.