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!

Show Totals on Details Line 1

Status
Not open for further replies.

Leeeon

Programmer
Mar 24, 2003
19
0
0
GB
Is it possible to force Access to print the totals from a group_footer next to the last entry in the details line eg assume Apples and Pears are two records from Details Section, and Total is sum of two in Fruits_Footer, I want report to look like:

Apples 24
Pears 12 Total: 36

Instead of:

Apples 24
Pears 12
Total: 36

Nearest I can get is using a running sum in details, but don't want a total showing against every record.

TIA

Leeeon
 
Hi,
The Print event of the Group Footer has access to the last row of data in the group. With this info, you should be able to find more information in Access help.
HTH, Randy
 
I expect you could place a text box in the Group Header section:
Name: txtGroupSum
Control Source: =Sum([FruitQty])
Then add a text box in the detail section
Name: txtRunSum
Control Source: FruitQty
Running Sum: Over Group
Then add code to the On Format event of the detail section:
Me.txtRunSum.Visible = Me.txtRunSum = Me.txtGroupSum

I haven't tried this but it might work.

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]
 
Thanks dhookom. That worked perfectly.

randysmid: Had a quick look at Access help but couldn't find anything that referred to this. Will try when have some spare mins. Thanks anyway.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top