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!

Adding numbers in Access

Status
Not open for further replies.

CB121

Technical User
Jun 22, 2003
15
US
I am making a job hour list and have the days.....
Mon - Tue Etc. and I want to add the hours of those days then multiply those hours by the labor rate per hour. I have used "expression" and thought that it would work but it won't. Can I get a little help?
 
Do you have any fields that you would like to share? It would really help to see some sample records and what you want for end results.

Do you have days as field names?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
dhookom,
Here is what I want to do.....
Mon
Tue
Wed
Ttl Hrs Rate Total
In the total hrs area should be the total hrs from Mon-Sat. In the rate area is the amount per hour and in the total area is the total dollar figure. So the total should be the rate times the hours. I tried to do this with the expression but when I go back after doing the expression nothing happens and it doesn't work.
 
Put this in the field:
Total: =[Ttl Hrs]*[Rate]
That should do it for you :)
 
Let's assume that you source query includes your data table with a Weekday column (containing Mon, Tue, Wed, etc.), an Hours column, a Rate column (which might be from another table that is linked through an employee account number to the main table). Create a grouping query something like this using the query builder:

SELECT [Weekday], Sum[Hours] AS TtlHrs, First[Rate] AS HrlyRate, (*[TtlHrs]*[HrlyRate]) AS TotalCost FROM [SourceTable] GROUP BY Weekday;

Obviously you will also include criteria to limit the date range, assuming your source data table includes a date column.
 
CB121,
I asked 2 questions and you didn't answer either of them. What's up with that?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top