Help with a query

A

aldunford

I wrote this query

Base Pay: IIf([Emp Base Pay Rate] Is Null Or [Total Amount Docked] Is Null
Or [Total Pay Adjustment] Is Null,0,[Emp Base Pay Rate]+[Total Amount
Docked]+[Total Pay Adjustment])

I need it to give me Base Pay even if Total Amount Docked and Total Pay
Adjustment is NULL. In other words Base Pay would be Emp Base Pay Rate if
total amount docked and total pay adjustmet where to be null. It works great
except if both are NULL.

Any suggestions?
 
K

Klatuu

Base Pay: Nz([Emp Base Pay Rate],0) + Nz([Total Amount Docked],0) + NZ([Total
Pay Adjustment],0)

The Nz function is used to covert a Null to another value. If the variable
or field is not null, it will use the actual value. It it is, it will use
the substitute value. In this case, use 0.
 

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

Similar Threads


Top