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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Format Hide Footer - Extra Line

Status
Not open for further replies.

Vittles

Programmer
Dec 7, 2000
95
US
I have a report grouped by a person's name that I want to have lines in between record details, but not a line at the bottom.

In the Northwinds Sample, they used the OnFormat Event to hide the group footer when a textbox in the header or detail section ("count") went up to a certain value.

In my report, the number of records may be greater for some individuals than others, so I can't use a specific number. For example the last record for the first person's group may be #14, and for the next set the last record is #100.

Is there a way to do a similar code or event based on there not being any more records for that specific group(after the last one)?
 
You can bind a text box in the group header to a count(). Then use code to compare the count text box to a running sum in the detail section to determine if the record is the last one in the group.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
It worked great. Thanks!

Just for future info:
I put a "total count" textbox with a value of =count([ID]) in the reporter header and a "group count" textbox with a value of =1 and the running sum property set to over group in the group header. I set the "total count" visible property to No. Then in the onformat event for the group footer I put in a cancelevent command based on the condition where the "group count"="total count".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top