Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you print 1 item in a group on a report....

Status
Not open for further replies.

colezpapa3

Programmer
Dec 8, 2007
73
US
I have a report which displays detail data that can contain a value of "CLOSED" or "IMAGE". The report is sorted where all the closed item display followed by the imaged items. They want the report to display ONLY 1 imaged record, the most recent. How can I do that in a report?
 
Assuming you have your report grouped by the CLOSED/IMAGE field, add a text box to your detail section:
Name: txtCount
Control Source: =1
Running Sum: Over Group

Then add code to the On Format event module like:
Code:
Cancel = (Me.txtCount > 1 AND Me.txtStatus = "IMAGE"

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top