Hi, I have a database into which order are entered. On this particular form the user enters the order info, then in a subform they can enter the items on the order. There is a hidden textbox on the suform that calculates the total value of the order with Quantity*Price. When they're done, they click the Add Order button.
This button (among other things) is supposed to copy the value from the hidden textbox into the TotalValue field for that order. It does this, but the value is never right...because the user clicks it immediately after entering the Qty/Price for the last item, Access does not include the value for the last item in the Sum total, because the record is still being edited according to it (ie the user will enter the Price for the last item, then click the button start away, meaning that record still has focus).
I have tried using SetFocus to move the focus away from the record when the Add Order button is clicked, and I've tried requerying the hidden Sum field after the button is clicked (since presumably, once the button is clicked, the record no longer has focus and the total value should be updated) but neither work. This is driving me crazy, can anyone help?