Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One Blank line after n records

Status
Not open for further replies.

RonMcIntire

Technical User
Oct 12, 2002
166
US
All:

I am printing a report with a blank line after n records. I know how to do this if all the fields in the record are are on one line.

MY PROBLEM
My problem is that if fields from the same record are on two or more lines in the report, I print one blank line for each field. In my case, I have two fields so I print two lines when I reach the nth record.

Here is my record layout:

LNAME, FNAME
(Phone Number)

I know there is a simple way to do it, I just don't see it yet. Any help is welcomed.

Ron

 
A kludgy method is to add a couple text boxes to the detail section of your report. Assuming you want spacing after every 5th record.

Name: txtCount
Control Source: =1
Running Sum: Over All
Visible: No

Name: txtGrow
Control Source: =IIf([txtCount] Mod 5=0," " & Chr(13) & Chr(10) & " " & Chr(13) & Chr(10) & " ",Null)
Visible: Yes
Can Grow: Yes
Can Shrink: Yes

Place txtGrow near the bottom of your detail section and maybe adjust the number of Chr(13) & Chr(10) & " ", to grow to the appropriate height. You could probably get finer adjustments by changing the font size.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom:

Thanks for your help. It works and is just what I need.

I shortened the txtGrow IIf statement to skip only one line like this =IIf([txtCount] Mod 5=0," " & Chr(13) & Chr(10),Null) and it works greats.

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top