Calculating fields in query that are calulations

  • Thread starter Thread starter KF
  • Start date Start date
K

KF

I have three calulated fields in a query I need to perform a calulation on
within a query.

Example:

[Field 1] = Base Salary * Merit Increase

[Field 2] = Percent of Target

[Field 3] = Ref Value

When I try to perform a calculation on the fields in the query I get
"#Error" in the Datasheet view.

Here is the formula i need to create
Field 4:= [Field 1] +([Field 1] *[Field 2] )+[Field 3]

Please help if you can.

Thanks

KF
 
Do it this way --
Field 4: ([Base Salary] * [Merit Increase]) +(([Base Salary] * [Merit
Increase]) *[Percent of Target] )+[Ref Value]
 
In addition to Karl's suggestion, if any of those fields might hold a Null,
wrap your reference to the field in something like (untested):

Nz([Field1],1) .... if you're going to be 'dividing by'
or
Nz([Field1],0) .... if you're going to be adding or subtracting

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top