Force an update

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running a calculation based on a value that is entered into a control on
a form (the calculation runs when a button is clicked) however it does not
return the correct value until I have moved onto the next record and then
back again - I assume forcing an update to the record.

Is there any way (preferably through using a Macro since I am really
struggling with the VB) to get this to happen

Thanks
 
The calculated value will be updated when the record is saved.

You can force the record to be saved with the RunCommand action.
In the lower pane of the macro design window, choose the SaveRecord
argument.
 
HelenJ said:
I am running a calculation based on a value that is entered into a
control on a form (the calculation runs when a button is clicked)
however it does not return the correct value until I have moved onto
the next record and then back again - I assume forcing an update to
the record.

Is there any way (preferably through using a Macro since I am really
struggling with the VB) to get this to happen

The result of a calculation should be displayed and not kept.

= [Quantity] * [price] in an unbound test box is one way.
TotalPrice:[Quantity] * [price] in a query is a better way.

While there are times when this approach is not suitable you should not
attempt to store a calculateed value until you know why you should *not* do
it.
 
Thanks Allen - just what I was looking for

Allen Browne said:
The calculated value will be updated when the record is saved.

You can force the record to be saved with the RunCommand action.
In the lower pane of the macro design window, choose the SaveRecord
argument.
 
Thanks Mike and yes I do understand that - this is not quite the situation
that you have described


Mike Painter said:
HelenJ said:
I am running a calculation based on a value that is entered into a
control on a form (the calculation runs when a button is clicked)
however it does not return the correct value until I have moved onto
the next record and then back again - I assume forcing an update to
the record.

Is there any way (preferably through using a Macro since I am really
struggling with the VB) to get this to happen

The result of a calculation should be displayed and not kept.

= [Quantity] * [price] in an unbound test box is one way.
TotalPrice:[Quantity] * [price] in a query is a better way.

While there are times when this approach is not suitable you should not
attempt to store a calculateed value until you know why you should *not* do
it.
 
Back
Top