Master/Detail Form/Subform with Aggregate Detail Total update to M

D

Dan Kline

I have a payment entry application. SO far everything has gone very well,
but I'm stumped on one trick.

The Payment File(Master Form) is linked to the Details(SubForm) and filtered
on DepositDate from the Master. (Just in case it matters, I am using a
splitform View with the datasheet on the bottom). Everything works perfectly
with the relationships. I have a PaymentTotal Textbox that calculates on the
subform and updates for all CRUD functions. I have a DepositTotal Textbox
that, using a recordset, totals the PayAmount fields for for all PayDetails
that meet the DepositDate criterion. When the form opens the DepositTotal
function triggers and the DepositTotal is correctly displayed. When I add
details on the Subform, the PaymentTotal updates but doesn't trigger the
function for the DepositTotal on the Master Form.

If I click out of the detail(subform) on a control on the MasterForm and
refresh the screen (F5), the DepositTotal on the MasterForm finally updates.
What I need to accomplish is to trigger the update of the DepositTotal
Control for any CRUD functions on the SubForm. I've tried using the events,
like AfterUpdate on the subform, but they don't seem to have any effect.

Whats the best way to accomplish this task?
 

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