Software

Add more white space to long Access reports for better readability

The more records output to an Access report, the harder it becomes to read. When you see your employees taking out their rulers to read your reports, it's time to add some white space between the lines. Mary Ann Richardson shows you how to add a blank line after every few records.

The more records output to an Access report, the harder it becomes to read. When you see your employees taking out their rulers to read your reports, it's time to add some white space between the lines. To add a blank line after every five records, follow these steps:

  1. Open your report in Design view.
  2. Click the Text Box tool, and then click and drag below the fields containing data in the Detail section to create an unbound text box. Delete the text box label.
  3. Click the Text Box tool, and then click and drag to create a small unbound text box beneath the first box. Delete the text box label.
  4. Right-click the first text box and select Properties.
  5. Click in the Name property box and type txtCounter.
  6. Click in the Visible property box and select No.
  7. Click in the RunningSum box and select Over All.
  8. Click in the ControlSource box and enter =1.
  9. Click in the CanShrink property box and select Yes.
  10. Right-click the second text box and select Properties.
  11. Click the Name property box and enter txtSpacer.
  12. Click in the CanShrink property box and select Yes.
  13. Click the drop-down list of the property list and select Detail.
  14. Click in the CanShrink property box and select Yes.
  15. Click the Event tab.
  16. Click in the On Format property box and select Event Procedure.
  17. Click the Build button and enter the following code at the prompt (be sure there is a space between the quotation marks):
    If (txtCounter Mod 4) = 0 Then
    

    txtSpacer = " "

    Else

    txtSpacer = Null

    End If

To adjust the amount of white space between the lines, simply resize the txtSpacer control to the desired height.

Miss an Access tip?

Check out the Microsoft Access archive, and catch up on our most recent Access tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

7 comments
richard.morgan
richard.morgan

Can the code be altered to add the blank space to every change in a field, e.g(when an officers name changes in a sorted list)

AtCollege
AtCollege

Can't get this to work. I am using Office 2007. Tried pasting in the code between Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) and End Sub What am I doing wrong. It would be great if it worked.

ray.labrecque
ray.labrecque

Thanks. I am slowly generating a Task Recorder as I am the primary Tech Support and IT Admin poing of contact for our office. I have used Access to build a form with check boxes, radio buttons, drop down selections and free form text entry. The hardest part is formatting the report, especially when the free form text field(s) exceed the space remaining on the front or first page... Your tips help!

ssharkins
ssharkins

When Mary Ann's good, she is good, isn't she? This is so good, I hang my head in shame that I didn't think of it myself. :)

Morneau80
Morneau80

Spice Works. Sure it's ad-supported, but it's free and excellent for IT support/tracking. I understand that you're probably very proud of your Task Recorder, but at least give SW a read. Hope it helps.