Multiplying two fields in a form

tppatter

New member
Local time
Today, 16:48
Joined
Sep 17, 2001
Messages
9
I would like to multiply one field (qty)with another field (price). I have tried using the expression builder, and I have put in the code =[Quantity] * [unit price]

But despite this, access leaves the field that is to show the calculation blank. Thanks in advance for any help someone might be able to provide.
 
In the After Update event of the Unit Price field (assuming the Quantity field has already been filled in) put this code:

Me.FieldNameToGetCalculation = Me.[Quantity] * Me.[Unit Price]

I assume that the Quantity field is name 'Quantity' and the Unit price field is named 'Unit Price'.
 
Thank you Jack, that worked!
 
On my form I have a sub-total field. I simply what the sub-total form to sum all the priced extended fields for each product. I have tried the formula me.subtotal=me.field1+me.field2, etc.

But no total is appearing in the sub total field. Thanks in advance for any help someone might be able to provide.
 

Users who are viewing this thread

Back
Top Bottom