Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem converting Nulls to zeroes in my query 1

Status
Not open for further replies.

hefly

Technical User
Feb 6, 2008
134
US
Problem: The field [PermitTerm] contains nulls. Where the field [PermitTerm] is null, all the queries I try only return nulls.

I need to add PermitTerm to LeaseTerm and get a number answer. I need to change nulls to zeroes so I can use PermitTerm as a number to add to other numbers.

I have tried:


Case 1: A two step problem using the expression [Pt] and [PmtTerm] Returns nulls:

Pt: IIf([PermitTerm]=Null,0,1) Returns 1 and Zeros
PmtTerm: IIf([Pt]=1,[PermitTerm],0)

Case 2: Pt: IIf([PermitTerm]=Null,0,[PermitTerm]) Returns nulls

Case 3: Pt: Nz([PermitTerm]) Returns Nulls

Thank you.

Hefly
 
And this ?
Nz(PermitTerm,0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes PH. That works.

Thank you!

Hrfly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top