IIF statement with blank records

Joined
Nov 12, 2010
Messages
1
Reaction score
0
Hello, I have a question regarding the use of blank records in the query fields. As a precursor to the rest of my post, I am extremely novice at all things database related so please bear with me here and thank you for your time.

Here is the formula I am attempting to use:

Shortage: IIf(([On Hand]-[Qty Due])<0,[On Hand]-[Qty Due],0)

I only need this to return shortages, not overages thus the less than operator. I am having an issue when the On Hand data is blank, it just returns a 0 instead of attempting to use the blank as a 0 ie. "Blank"-1000 returns a 0 where 1-1000 returns -999.

I'm sure this is just a basic issue that may have a simple resolution, but I have taken the time already to try to Google up a solution and it has been fruitless thus far. I hope you can help me in this quest of knowledge and please don't hesitate to let me know if I didn't supply enough information.

Thank you for your time and insight,
Dustin

Also, if you have any suggestions as to what resources I could get my hands on to further my Access knowledge, I'd love to hear that as well.
 
Back
Top