Conditional update of main form from subform

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
 
K

kagard

Thanks for the reply.

In the POs we are sending out, we need to list and store the retail
prices. Entering a lot price at the detail level, while retaining the
individual unit and extended prices sounds like it would get messy
trying to do the calculations.

And, more to the point, my boss has specifically requested the current
layout...

Thanks again,

K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top