I have an Inventory Database and I need to add a validation rule to the quantity field when the user inputs the amount of an item into the system. I want it to stop the user if he is inputting a # greater then that which is currently in stock (calculated field). I only want this to happen when inventory is going out (Outgoing Transaction or shrinkage etc...) but not during an incoming transaction (Order Entry).
This is the rule that I've applied to the quantity field in the form but it always delivers the validation message so I'm doing something wrong.
=IIf([Forms]![ALL ORDERS]![Transaction Type]=1,>0,<=[Text9])
[Transaction Type] 1 is an Incoming order so any # greater then 0 is accepted, but if the transaction type is any other kind, then the quantity has to be less then [Text9] (current stock).
What and I doing wrong???
Thanks
This seems to work for me:
([Transaction Type]=1 And [Quantity]>0) Or ([Transaction type]>1 And [Quantity]<=[Text9])
Note, no equals.