K
kagard
Greetings:
I have created a purchase order form and subform. As you would expect,
the main form shows the PO data, and the subform shows the individual
items on the PO. I calculate the subtotal in a text box in the subform
footer. This works fine. However, we sometimes ignore the line item
prices and type a total in the PO Total text box on the main form.
I have written an after update event procedure in the subform that
looks at the main form to see if the Use Lump Sum Total checkbox is
checked. If it is, the PO Total textbox on the main form is not
updated. If it is not, the PO Total textbox is updated with the revised
total.
HERE'S THE PROBLEM: The PO Total on the main form is updated before the
subtotal on the subform, so the number placed on the main form is the
value before the edits on the subform. The old value is set, then
Access, lastly, updates the value of the calculated field on the
subform.
I have tried:
1. Setting focus on the main form, then the subform, and back to main
form in hopes of getting the subform subtotal to recalculate.
2. Tried doing a requery, repaint, or recalculate of the subform.
(Which, oddly, yeilds 0 on the main form, then displays the correct
total on the subform.)
Any suggestions? TIA...
Keith
I have created a purchase order form and subform. As you would expect,
the main form shows the PO data, and the subform shows the individual
items on the PO. I calculate the subtotal in a text box in the subform
footer. This works fine. However, we sometimes ignore the line item
prices and type a total in the PO Total text box on the main form.
I have written an after update event procedure in the subform that
looks at the main form to see if the Use Lump Sum Total checkbox is
checked. If it is, the PO Total textbox on the main form is not
updated. If it is not, the PO Total textbox is updated with the revised
total.
HERE'S THE PROBLEM: The PO Total on the main form is updated before the
subtotal on the subform, so the number placed on the main form is the
value before the edits on the subform. The old value is set, then
Access, lastly, updates the value of the calculated field on the
subform.
I have tried:
1. Setting focus on the main form, then the subform, and back to main
form in hopes of getting the subform subtotal to recalculate.
2. Tried doing a requery, repaint, or recalculate of the subform.
(Which, oddly, yeilds 0 on the main form, then displays the correct
total on the subform.)
Any suggestions? TIA...
Keith