update form on change of field used in expression

  • Thread starter Thread starter mtggal
  • Start date Start date
M

mtggal

I have one form based on a table, which calculates the unit costs based on
the total price and number of units received. I created this form some time
ago, and it works perfectly. The moment I change the total cost or units, it
updates the unit price field accordingly.

I created a similar form, also using an expression that determines the
profit if sold at a price (the 'sold at' field). However this form does not
change the calculated field until I F5 or refresh. I cannot see what I did
differently in the original form, however would like this new form to update
immediately when I change one of the fields the expression is based on.

Example of expression would be: =[Sold_at]-[UnitCost]

Thanks in advance for the help.
 
First, I would put the code on the after update event of both Sold_at and
UnitCost.
When user updates either Sold_at or UnitCost, the calculated control should
show the new profit.

Note that your post gives us very little information to use in trying to
work out why it's not working.
Is this how you have set up the code?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Back
Top