If the form is bound, then you just do the calculation on the Before Insert and Before Update event of the form. It is generally not a good idea to store calculated values, however, there are times when it is beneficial, as when the variables may change and you want the value actually charged a customer using the then current value.
That being said, do something like this:
Dim iQuantity As Integer
Dim lPrice, lTotal As Long
iQuantity = Me.Quantity
lPrice = Me.Price
lTotal = iQuantity * lPrice
Me.Total = lTotal
Did that work?
mmcdonal
|