Crosstab to provide data for calculated field in form

tikkat3

Registered User.
Local time
Today, 07:21
Joined
Apr 10, 2007
Messages
66
I am trying to create a calculated field in my form. The calculation I am attempting to create is the cost of installation labour.

In my table1 (the table where the calculation will occur) I have a date field, installation hours and the unbound calculated field. There is a separate table, which was created from a crosstab query to list out the hourly rates of each department in a given year.

My calculated field should calculate the total cost if the date is in year A based upon the hours worked (installation hours field) * the hourly rate for year A. As this is an ongoing database and the rate changes once each year (on 1st May) an IIF statement is being used.

Below is the expression I have used but am coming up with a ?NAME error:

=IIf([Table1]![Activity Date]>=#01/05/2008#,Sum([Labour Rates xtab]![2009]*[Table1]![Installation Hours]),Sum([Labour Rates xtab]![2008]*[Table1]![Installation Hours]))

[Labour Rates xtab] is the table created from the crosstab query.

Any thoughts as to what I am doing wrong?
 

Users who are viewing this thread

Back
Top Bottom