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

Checking for zero before operation 1

Status
Not open for further replies.

wdverner

Technical User
Mar 10, 2005
160
GB
Hi All
Quick Question

I have this calculation Per: [SM]/[TW]

What i want to do is before i do this, check if TW is zero- if it is then Perf=0 else carry out the operation..


Whats my best way of achieving this?

Many Thanks to all.
 
Per: IIf(Nz([TW],0)=0,0,[SM]/[TW])

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