Calculating fields in query that are calulations

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
 
K

KARL DEWEY

Do it this way --
Field 4: ([Base Salary] * [Merit Increase]) +(([Base Salary] * [Merit
Increase]) *[Percent of Target] )+[Ref Value]
 
J

Jeff Boyce

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top