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!

Totaling Problem

Status
Not open for further replies.

Eightball3

Programmer
Nov 23, 2002
138
US
This is tough to describe but here goes..

I have a report that is grouping by 'make'. The report averages the hours charged by the mechanic for each specific make. Within that same grouping I have a textbox query the history table of all items completed by that make by anyone and averages the hours charged to that make. So I end up with a persons average charge time compared to the same items averaged charge time historically. This all works fine. The problem comes at the report footer when I want to Average the Averages for both the mechanic and the history to show an overall comparison. I get error messages referring to both of the average textboxes when trying to compute the overall average. I hope this isn't too confusing.

 
What do you have in the contorl source for the textboxes in the make grouping and what do you have as the control source for the textboxes in the Report Footer. You can't calculate calculated textboxes so if you do any calculation in the Group, you need to repeat those same formula's in the Report footer textboxes.

Paul
 
I guess that what I'm trying to do is not possible. I have a history of work table. My recordsource for the report is a query that grabs only the items completed by one mechanic. The textboxes in the report that are associated with this recordsource work fine, even in the report footer. The other textbox data comes from a dsum. It basically grabs all the same records from the same history table except for all mechanics instead of just one. I divide it by the number of found records thus giving me an average. This value is the value I can't seem to use to do any further calculations. I don't see how I would be able to use the same formulas for the footer average.
 
Normally if you have a textbox, I'll call TextA in the Detail section that says
=Textbox1 + Textbox2
it will sum the two textboxes in your detail section. Now in the Report Footer, if you put a textbox that says
=Sum(TextA) so you can get a Total, you will get an error. But if you put
=Sum(Textbox1 + Textbox2)
it will do what you want. But in your case where you are using a DSum(), it seems that no matter where in the Report you use it, it's only going to return a single value. The other possiblility would be to get the values summed in a query that you need and then use a DLookUp to get that amount onto your Report Footer. Then if you need a count you can get that from a query using the same DLookUp or you can do a count
=Count(*)
right in the Report.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top