Expressions

A

Amin

Kindly explain to us what this expression actually means.
i got it from the sample database 2007 temlate

Qty To Reorder: IIf([Qty Below Target Level]>0,IIf([Qty Below Target
Level]<[Minimum ReOrder Quantity],[Minimum Reorder Quantity],[Qty Below
Target Level]),0)
 
J

John Spencer

The expression is designed to return one of three values.

Qty To Reorder:
IIf([Qty Below Target Level]>0
,IIf([Qty Below Target Level]<[Minimum ReOrder Quantity]
,[Minimum Reorder Quantity],[Qty Below Target Level])
,0)

If the value of [Qty Below Target Level] is zero (or Less) then return zero
If the value of [Qty Below Target Level] greater than zero then return the
greater of [Minimum ReOrder Quantity] or [Qty Below Target Level]

Nested IIF clauses can be difficult to understand.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top