Unable to get Field to update with Total

Celtlink

Registered User.
Local time
Today, 14:03
Joined
Oct 21, 2010
Messages
10
Hi Please help with below: Fields are Quantity UnitPrice Discount Price
I cannot get Price to update the total....?



Private Sub ProductID_AfterUpdate()
Me.UnitPrice = Me.ProductID.Column(2)
End Sub
(This bit actually works and places the product price in UnitPrice)


Private Sub Quantity_AfterUpdate()
Me.Price = Round(Me.Quantity * (Me.UnitPrice - (Me.UnitPrice * Me.Discount)))
End Sub

Private Sub Price_AfterUpdate()
Call Quantity_AfterUpdate
End Sub

Please help cannot understand why it doesnt work, the debug does not see any errors in coding, yet no figure appears in price field.

REgards
Brian
 
Is it Discount or Discount Price? If Discount Price then Me.Discount shouldl be [Me.Discount price]
 
Discount and Price are two separate fields. I have "Quantity" "UnitPrice" "Discount" "Price" Discount is a percentage. I need to work out the Price.
 
I created a form to simulate your input with four fields Unit Price, Quantity, Discount and Price.

I entered 14 for the unit price, 0.1 for the discount and 10 for the quantity and the code below in the after upodate event gave the correct price of 126. I did not use the Price After Update


Private Sub Quantity_AfterUpdate()
Me.Price = Round(Me.Quantity * (Me.UnitPrice - (Me.UnitPrice * Me.Discount)))
End Sub

What do you mean by I cannot get Price to update the total....?
 
Hey Poppa Smurf !

Fantastic ! took out the call update sub and it now works... thanks very much for your assistance.....appreciatted....

sorry for delay in response, see your out in oz...time diff to UK had to go to bed as was knacked...

thanks again

Brian
 
I am glad to assist. I hope you can recharge your batteries by sleeping
 

Users who are viewing this thread

Back
Top Bottom