Robbyp2001
Registered User.
- Local time
- Today, 10:41
- Joined
- Oct 8, 2011
- Messages
- 143
Hello folks
I have a form [StockSub1] which contains a field [CurrBalance] and another [Numentered]. The user enters the number of items ordered and this is displayed in a subform below. The new current [CurrBalance] is recalculated, ready for the next [Numentered].
Is it possible to write some code that will produce a message for the user when the [CurrBalance] figure is lower than the [Numentered]? Eg CurrBalance = 50, Numentered = 51. I would like to cancel the request at this point.
What is happening is that the database is performing the calculation and in the cases like EG above, a negative figure is displayed.
The lowest figure for current stock is of course 0 (zero)
So:
If [Numentered] is < [CurrBalance] then perform the action (as it does already)
If {Numentered] is > [CurrBalance] then produce a MsgBox Warning to Cancel the action.
Many thanks
Rob
I have a form [StockSub1] which contains a field [CurrBalance] and another [Numentered]. The user enters the number of items ordered and this is displayed in a subform below. The new current [CurrBalance] is recalculated, ready for the next [Numentered].
Is it possible to write some code that will produce a message for the user when the [CurrBalance] figure is lower than the [Numentered]? Eg CurrBalance = 50, Numentered = 51. I would like to cancel the request at this point.
What is happening is that the database is performing the calculation and in the cases like EG above, a negative figure is displayed.
The lowest figure for current stock is of course 0 (zero)
So:
If [Numentered] is < [CurrBalance] then perform the action (as it does already)
If {Numentered] is > [CurrBalance] then produce a MsgBox Warning to Cancel the action.
Many thanks
Rob