Grouping, counting and an event

J

JJurek

I am working in Access 2003.

I want the report to list out the first 5 records and then draw a line for
separation.
Then read the next 5 and draw a line and so on until EOF.

Example:

Smith, John
Adams, John Q.
Lincoln, Abraham
Clinton, Bill
______________________________

Washington, George
Jefferson, Thomas
etc, etc, etc

Any suggestions? I have a few other reports I need to design that will have
to do
this separation with a line but at a different interval. This one happens
to be at 5.

Thanks for your input,

-J
 
A

Allen Browne

1. Add a text box to your report, and give it these properties:
Control Source =1
Running Sum Over Group
Format Fixed
Decimal Places 0
Fore Color 16777215
Name txtCount
This gives you a text box that counts the records in your report, but shows
nothing (white on white.)

2. Select this text box, and choose Conditional Formatting (CF) on the
Format menu. Set Condition 1 to:
Expression Is ([txtCount]-1) Mod 5 = 4
Then click the bucket icon in the CF dialog, and choose black (or whatever
color line you want.)

3. Place this line below the other text boxes in the section, and reduce its
Height property 0.01" or however fat you want your line to be.

For your other reports, change the 5 to the number of records you want
between lines, and the 4 to 1 less than the number of lines, e.g. for a line
very 10 records the CF expression would be:
([txtCount]-1) Mod 10 = 9
 
J

JJurek

Allen,

PERFECTO!

I made one small mistake. In the control source I put "1" and not "=1"
Exactly what I was looking for, Thanks again!!

Allen Browne said:
1. Add a text box to your report, and give it these properties:
Control Source =1
Running Sum Over Group
Format Fixed
Decimal Places 0
Fore Color 16777215
Name txtCount
This gives you a text box that counts the records in your report, but shows
nothing (white on white.)

2. Select this text box, and choose Conditional Formatting (CF) on the
Format menu. Set Condition 1 to:
Expression Is ([txtCount]-1) Mod 5 = 4
Then click the bucket icon in the CF dialog, and choose black (or whatever
color line you want.)

3. Place this line below the other text boxes in the section, and reduce its
Height property 0.01" or however fat you want your line to be.

For your other reports, change the 5 to the number of records you want
between lines, and the 4 to 1 less than the number of lines, e.g. for a line
very 10 records the CF expression would be:
([txtCount]-1) Mod 10 = 9

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

JJurek said:
I am working in Access 2003.

I want the report to list out the first 5 records and then draw a line for
separation.
Then read the next 5 and draw a line and so on until EOF.

Example:

Smith, John
Adams, John Q.
Lincoln, Abraham
Clinton, Bill
______________________________

Washington, George
Jefferson, Thomas
etc, etc, etc

Any suggestions? I have a few other reports I need to design that
will have to do this separation with a line but at a different interval.
This one happens to be at 5.
 

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