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!

Help with some programming in totalling groups in a report

Status
Not open for further replies.

pilky01

Programmer
Jan 24, 2007
2
GB
I need some help with solving a problem in a report in Microsoft Access.

I have a database that is based around a building business and what I require from this report is a list of all the payments made. I have produced a query that works fine and allows me to select the date region I want to see payments within. I now need to manipulate the data within the report to achieve the other things that I need. I need to total all of the gross payments made to each individual subcontractor. So for SubContID 1 I need a total gross amount, and for SubContID 2 I need a total gross amount, etc.

I have tried to do this with VBA code but can't actually get it to look through all the records on my report and keep a running total for a subcontractor. It could look through the data several times and pick up and total first subcontractor, then the second, etc. if it had to, but this I cannot do either. Also there may not always be all SubContrators present in this report and new ones are added all the time, so this I do not know how to get around either.

Hope that this is clear enough to understand. Thanks for any help in advance.
 
You need to have grouping on Sub contractors.
Click on the Grouping/Soting icon when you arein the design view of the report.
choose grouping from the dialog box.
Group header/footer yes.

Place a textbox on the group footer and set it's controlsource
=Sum([AmountFieldName])
change "AmountFieldName" actual name of the field.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top