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

Expression with 0

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG


How to avoid the error in a query when one of the 2 fields has a 0 value?
My expression is
field1*field2/field1

However when the value of the field1 is say 0, i want to divide field2/field1,that is to say to avoid the
multiplication by 0, which gives 0




 
Take a look at the IIf function.

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

Part and Inventory Search

Sponsor

Back
Top