Limit detail field to 5 records

  • Thread starter Thread starter Indu Aronson
  • Start date Start date
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
 
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, 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





.
 
Back
Top