help on inventory criteria

  • Thread starter Thread starter ai_enjoi via AccessMonster.com
  • Start date Start date
A

ai_enjoi via AccessMonster.com

What criteria should be placed on the textbox "qty" on Form1 so that the
quantity that is going to be purchased should not exceed the quantity on hand,
which is shown on the textbox "unitsleft". Also if the quantity purchased
exceeds the quantity on hand, what should i do so that the quantity purchased
will equal the quantity on hand so that it will just purchase the remaining
units instead of exceeding the quantity on hand. Is this possible? If so,pls
help! Thanks!

Pls reply ASAP! Really needed! Thanks again!
 
Put the following code in the BeforeUpdate event of the textbox "qty":

If Me!Qty > Me!UnitsLeft Then
Msgbox "The Purchased Quantity Can Not Exceed The Quantity On Hand"
Me!Qty = Me!UnitsLeft
End If

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
Thanks!
Put the following code in the BeforeUpdate event of the textbox "qty":

If Me!Qty > Me!UnitsLeft Then
Msgbox "The Purchased Quantity Can Not Exceed The Quantity On Hand"
Me!Qty = Me!UnitsLeft
End If

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
What criteria should be placed on the textbox "qty" on Form1 so that the
quantity that is going to be purchased should not exceed the quantity on
[quoted text clipped - 9 lines]
Pls reply ASAP! Really needed! Thanks again!
 
Back
Top