Hi,
I have a main form listing items with quantities, and a sub-form that lists the transactions that make up the quantities for the corresponding item. On the sub-form a user changes the quantity in a field, and this sets a value in another field to the difference between the original quantity and the new quantity. Once the record is saved, then an unbound text box in the header of the sub-form recalculates and displays the sum quantity.
Now, I need to update the quantity field in the main form with this revised sum quantity appearing in the sub-form header. How can do this? I have tried an update query, added to the macro which sets the value and saves the record, but when it goes to run, the unbound field containing the sum has yet to display the new figure and therefore updates the main form with the previous value.
How can I time this, so the unbound field has displayed the new value for the main form field to be updated correctly?
Thank you,
LP
I have a main form listing items with quantities, and a sub-form that lists the transactions that make up the quantities for the corresponding item. On the sub-form a user changes the quantity in a field, and this sets a value in another field to the difference between the original quantity and the new quantity. Once the record is saved, then an unbound text box in the header of the sub-form recalculates and displays the sum quantity.
Now, I need to update the quantity field in the main form with this revised sum quantity appearing in the sub-form header. How can do this? I have tried an update query, added to the macro which sets the value and saves the record, but when it goes to run, the unbound field containing the sum has yet to display the new figure and therefore updates the main form with the previous value.
How can I time this, so the unbound field has displayed the new value for the main form field to be updated correctly?
Thank you,
LP