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!

Signature
ai®
George - 25 May 2007 11:56 GMT
Dear friend,
For your first question you can use a validation rule, e.g. <=[unitsleft]
About your second question: Use the after update and type the following:
if me.qty > unitsleft then
me.qty = unitleft
Endif
Hope this helps,
GeorgeCY
Ο χρήστης "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,
[quoted text clipped - 6 lines]
>
> Pls reply ASAP! Really needed! Thanks again!
ai_enjoi - 25 May 2007 12:38 GMT
Thanks!
>Dear friend,
>
[quoted text clipped - 17 lines]
>>
>> Pls reply ASAP! Really needed! Thanks again!

Signature
ai®
Andy Hull - 25 May 2007 11:59 GMT
Hi
Go to the properties of the text box qty and choose the Data tab.
Put the following in the Validation Rule
< unitsleft
and the following in Validation Text
"The Quantityto be Purchased must be less than the Quantity on Hand"
(or whatever you want the message to be)
If this works ok do you need to also check the quantity purchased?
Regards
Andy Hull
> 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,
[quoted text clipped - 6 lines]
>
> Pls reply ASAP! Really needed! Thanks again!
ai_enjoi - 25 May 2007 12:38 GMT
I have a running balance on the quantity on hand and i just wanted to make
sure that whoever uses this db won't make a mistake in inputting the quantity
to be purchased so that it won't exceed the quantity on hand. Thanks for the
help!
>Hi
>
[quoted text clipped - 20 lines]
>>
>> Pls reply ASAP! Really needed! Thanks again!

Signature
ai®