Formula Needed

chantale

New member
Local time
Today, 10:47
Joined
Nov 30, 2003
Messages
7
I would like some help on how to write up a formula that uses the following fields: Quantity, Unit Price and Price. The formula is to calculate the Price automatically by multiplying the Quantity and Unit Price. Any suggestions?
 
In the Control Source of an unbound control:

=[Quantity] * [UnitPrice]

In the After Update of the Quantity or UnitPrice Control:

Me.Price = [Quantity] * [UnitPrice]

Change the names to reflect the actual names of your controls and do not save the value from the calculation in your table. In other words, Price should not be stored but calculated as you need it...

hth,
Jack
 
Jack is, of course, quite correct. You can do a similar thing in a query by adding a calculated field by entering the formula in the Query Grid like this:
Price: [Quantity] * [UnitPrice]
 
Thank you!!

Thank you for your help Jack & Neil. I'll be sure to give it a try and see if I can make it work!!
 

Users who are viewing this thread

Back
Top Bottom