G
Guest
Hi,
I have three numberical fields in a continous form and whenever one is
updated, the other two must be re-calculated to reflect the change.
The three fields are txtCostPrice, txtSalePrice and txtMargin.
So far I've got:
OnUpdate event for txtSalePrice
Me!txtMargin = Round((1 - (Me!CostPrice / Me!SalePrice)), 4)
to update the margin figure if the sale price changes.
However, this changes the margin value for all the records in the form, not
just the current one. How do I change the focus to just the updated record?
Thanks.
I have three numberical fields in a continous form and whenever one is
updated, the other two must be re-calculated to reflect the change.
The three fields are txtCostPrice, txtSalePrice and txtMargin.
So far I've got:
OnUpdate event for txtSalePrice
Me!txtMargin = Round((1 - (Me!CostPrice / Me!SalePrice)), 4)
to update the margin figure if the sale price changes.
However, this changes the margin value for all the records in the form, not
just the current one. How do I change the focus to just the updated record?
Thanks.