Limit detail field to 5 records

I

Indu Aronson

I have an Access 2002 report where in the group header I
have I have a field called EmpDate and a field in the
Detail section called StatusDate.

I would like to see all the EmpDate but I would like to
restrict the StatusDate to only 5. Some Employees have
over 25 entries in the StatusDate Field.

I cannot restrict it by using top 5 as I only wind up
getting 5 EmpDates. I just want to restrict the number of
StatusDate entries to make the report easier to read.

I hope that this is not too complicated and that someone
can help!

Thank you.

--Indu
 
D

Duane Hookom

I would add an invisible text box "txtCount" and set its control source to
=1 and Running Sum to over Group. In the On Format event of the detail
section, add this code:
Cancel = Me.txtCount>5
 
I

Indu Aronson

Duane, thanks for your help!
-----Original Message-----
I would add an invisible text box "txtCount" and set its control source to
=1 and Running Sum to over Group. In the On Format event of the detail
section, add this code:
Cancel = Me.txtCount>5

--
Duane Hookom
MS Access MVP





.
 

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