Quick question

Vu_Ho

Registered User.
Local time
Yesterday, 16:09
Joined
Aug 19, 2013
Messages
20
This may sound simple but I don't really know how to go about this:
I have 3 fields: "Quantity," "UnitPrice" and "Total". I want to put a code that before I enter the field, the default value of "total" would equal Quantity*UnitPrice"
Thanks
 
This may sound simple but I don't really know how to go about this:
I have 3 fields: "Quantity," "UnitPrice" and "Total". I want to put a code that before I enter the field, the default value of "total" would equal Quantity*UnitPrice"
Thanks

Did you plan to store the value in your Table? If so, then Paul is correct when he says that you should not be doing that, and you might want to take time to rethink your processs.

If, however, you plan to display the value in a Form or Report, then you may already have the method (almost). Setting the Control Source for the [Total] Control Field on the Form or Report to "=[Quantity]*[UnitPrice]" could be provide you with what you are looking for.

-- Rookie
 
Problem is I want this value to be loosen, people can enter the factual values that may not be as calculated. Let me be a little bit more specific: theoretically, what pr2-eugin proposed is right. but in fact, sometimes, people want to enter different amount in the total because customers keep sending in different things. So in that case, the total amount would be other than the one that was calculated in a query, which hard to correct latter. Thanks
 

Users who are viewing this thread

Back
Top Bottom