Printing lines after every 3rd record

G

Guest

my report has a lot packed into the Detail section of each page. It would be
great if I could print a horizontal line after every 3 records. What's the
best way to do this?

thanks in advance
 
F

fredg

my report has a lot packed into the Detail section of each page. It would be
great if I could print a horizontal line after every 3 records. What's the
best way to do this?

thanks in advance

Add a line to the bottom of the detail section.

Add an unbound text control to the detail section.
Set it's control source to:
=1
Set it's RunningSum property to
Over All
Name this control "CountRecs"
You can make it not visible if you don't wish show the line number.

Code the detail format event:
Me![LineName].Visible = Me!CountRecs Mod 3 = 0
 
G

Guest

way cool!
--
cinnie


fredg said:
my report has a lot packed into the Detail section of each page. It would be
great if I could print a horizontal line after every 3 records. What's the
best way to do this?

thanks in advance

Add a line to the bottom of the detail section.

Add an unbound text control to the detail section.
Set it's control source to:
=1
Set it's RunningSum property to
Over All
Name this control "CountRecs"
You can make it not visible if you don't wish show the line number.

Code the detail format event:
Me![LineName].Visible = Me!CountRecs Mod 3 = 0
 
G

Guest

Hi Fredg,
This is just what I need also, but is there a way to have it reset for each
new page? The way it is now the line might be after the 1st, 2nd, or 3
record on pages after the first.
Thanks,
--
Phil


fredg said:
my report has a lot packed into the Detail section of each page. It would be
great if I could print a horizontal line after every 3 records. What's the
best way to do this?

thanks in advance

Add a line to the bottom of the detail section.

Add an unbound text control to the detail section.
Set it's control source to:
=1
Set it's RunningSum property to
Over All
Name this control "CountRecs"
You can make it not visible if you don't wish show the line number.

Code the detail format event:
Me![LineName].Visible = Me!CountRecs Mod 3 = 0
 
F

fredg

Hi Fredg,
This is just what I need also, but is there a way to have it reset for each
new page? The way it is now the line might be after the 1st, 2nd, or 3
record on pages after the first.
Thanks,

Try it this way.

Add a line control to the detail section.

Add a global variable to the code declarations section:

Option Compare Database
Option Explicit
Dim intMyCount as Integer

Code the Page Header Format event:

intMyCount = 0


Code the Detail Print event:

intMyCount = intMyCount + 1
LineName.Visible = intMyCount Mod 3 = 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top