
October 30th, 2009, 01:21 PM
|
|
Registered User
|
|
Join Date: Oct 2009
Posts: 2
Time spent in forums: 28 m 5 sec
Reputation Power: 0
|
|
|
Aggregate function error
Hi,
I'm pretty new to access, and I'm trying to create a database that tracks actual hours and labor costs compared to bid costs. I have a query that sums the hours based on assigned job number and generates a table, and now I'm trying to get a second query to multiply those values by the cost-per-hour of the various job titles. I keep getting an aggregate function error when I try that query. Any help would be REALLY appreciated! This is the code:
SELECT [Hours Per Show].[Job Number], [Hours Per Show]![SumOfHours(Carp)]*[Hourly Rates]![Carp (Per Hour)] AS [Carpentry Costs], [Hours Per Show]![SumOfHours(Metal)]*[Hourly Rates]![Metal (Per Hour)] AS [Metal Costs], [Hours Per Show]![SumOfHours(Drafting)]*[Hourly Rates]![Drafting (Per Hour)] AS [Drafting Costs], [Hours Per Show]![SumOfHours(CNC)]*[Hourly Rates]![CNC (Per Hour)] AS [CNC Costs], [Hours Per Show]![SumOfHours(Paint)]*[Hourly Rates]![Paint (Per Hour)] AS [Paint Costs], [Hours Per Show]![SumOfHours(Electric)]*[Hourly Rates]![Electric (Per Hour)] AS [Electrics Costs], [Hours Per Show]![SumOfHours(Labor)]*[Hourly Rates]![Labor (Per Hour)] AS [Laborer Costs] INTO [Labor Costs Per Show]
FROM [Hours Per Show], [Hourly Rates]
GROUP BY [Hours Per Show].[Job Number];
|