Printing lines after every 3rd record

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
Back
Top