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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF Not Working 1

Status
Not open for further replies.

jlg5454

Technical User
Jan 6, 2005
98
US
I'm trying to make this IIF function work with no sucess:
NewTot: IIf([StatTotal]="",0,[StatTotal])
It gives me blank for the nulls and #Error for what I want StatTotal value to be.

Thanks,

Joe
 
You may try this:
NewTot: Val([StatTotal] & "")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks I like that. I actually got this to work with this after I posted - NewTot: IIf([StatTotal] Is Not Null,[StatTotal],0)
 
Shorter notation for exactly the same as your latest IIf:
NewTot: Nz([StatTotal],0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top