totaling records

kingsgambit

Registered User.
Local time
Today, 16:39
Joined
May 27, 2001
Messages
134
I have two tables one holds jobcard info the other what stock was used with the jobcard. I have made a query from this and then a report.
The report should show all job cards per company per week.
It does show this but calculates the hours wrong.
Because the two tables are linked when the query runs each time it finds a stock item it will find the hours of the jobcard. So if it took 1 hour to fit three items it is totalling the hours as six becuase each stock item is bringing up the hours.
Is there a calculation that I could use on the report to solve this.
The report should look like

Date
Hours worked
Stock Item
 
Have you tried creating a subreport?


OR:
Do you want to have a sumation per week?
On your report you have a company and week section, you can add a text box field in the detail of the week section which simply sums up the stock hours field returned by the query.

Try this (properties of text box)
default value=[StockHours]
Running Sum=yes
OR this:
control source=nz(Sum([StockHours]),0)
Running Sum=no

I'm not sure where you want the sumation or if the query is returning the correct results you are looking for. If the query is not correct to begin with, mess around with subreports. You simply link the two with fields you want.
 

Users who are viewing this thread

Back
Top Bottom