By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,761 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,761 IT Pros & Developers. It's quick & easy.

IIF Statement followed by Calculation

P: 3
I have attempted a few times using various form of IF statement to do following the calculation in Access 2007:

Inventory Position: (IIf([Remaining Days Before Parts Available]>[the Days before Fulfillment],[On Hand Inventory],[On-Hand Plus Pipeline])-[Unfulfilled Qty])

However it didn't work. Does anyone know how I should correct this calculation? Thanks!
May 29 '12 #1
Share this Question
Share on Google+
5 Replies


dsatino
100+
P: 393
IIf([Remaining Days Before Parts Available]>[the Days before Fulfillment],[On Hand Inventory],[On-Hand Plus Pipeline]-[Unfulfilled Qty])
May 29 '12 #2

Rabbit
Expert Mod 10K+
P: 12,366
What do you mean by it doesn't work?
May 29 '12 #3

P: 3
dsatino-Thank you for statement. Sorry that I didn't clarify the equation. What I try to calculate is if [Remaining Days before Parts Available] > [the Days before Fulfillment], the the inventory position will equal to [On Hand Inventory]- [Unfulfilled Qty]; If [Remaining....] <[the Days before...], inventory position will equal to [On-Hand Plus Pipeline]-[Unfulfilled Inventory].
May 29 '12 #4

P: 3
Rabbie- The result was blank and I'm sure which part of the statement is wrong.
May 29 '12 #5

dsatino
100+
P: 393
Well, what I gave you was the correct syntax. You simply had too many parantheses.


In general the IIF function is as follows:

IIF([statement to evaluate], result/expression where statement is true, result/expression where statement is false)


for example:

IIF(5>4,"YES!!!","no....") would return: YES!!!

whereas

IIF(4>5,"YES!!!","no....") would return: no....
May 29 '12 #6

Post your reply

Sign in to post your reply or Sign up for a free account.