Link to home
Start Free TrialLog in
Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on

Requery/Refresh subform

I have a pretty standard from/subform form in an app I am developing.  The client uses it to set up payment plans for their customers.

The main form is frmInstallPain_Main with  recordsource of tblInstallPay_Main

The subform is frmInstallPay_Sub with a recordsource of qryInstallPay_sub, which is a query over tblInstallPay_Sub sorted so the due dates show in order.



On the main form there is a button 'Generate/Regenerate' payments.  When this button is pressed logic is invoked that looks at the items on the top of the screen (agreement date, number of payments, downpayment amount) then calculates the balance due for the account and generates a payment schedule for the specified number of payments.

Simple stuff and the logic work as it should.

If the user is editing an existing payment and clicks the button to regenerate, the new schedule is calculated and shows in the subform.

The problem is when a new plan is being entered.  All of the above steps take place but the payment schedule does not show in the subform.

To add a new plan the form is opened with acformadd :

docmd.openform "frmInstallPay_Main",,,,acformadd

How can I get the newly created payment plans to show the generated schedule in the subform?  

At this point the users have to exit the form and then come back in to see the generated schedule.  Obviously not acceptable.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mlcktmguy

ASKER

perfect