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

iif(iserror() query

Status
Not open for further replies.

jameshopper

Technical User
Jun 2, 2005
11
GB
Hi,
i found a problem at work today that i could do with a hand on if possible. I've found a few #error results in a calculated field, which i would like to be blank. Having a background in excel, i know there's a way there of using if(iserror(...., but this doesn't appear to be the same in access. I tried using iif(iserror(([field1]*2.25)+([field2])*3.5)),0,([field1]*2.25)+[field2])*3.5))
but it still left the #errors in place.

i'm sure this is a pretty simple thing and i must be doing something plainly wrong, but if someone could point me in the right direction, i'd be very happy

cheers
 
Something like this ?
IIf(IsNull([field1]) OR IsNull([field1]), 0, [field1]*2.25 + [field2]*3.5)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top