Subform changes update main form

TrustJesus

New member
Local time
Today, 04:38
Joined
Feb 14, 2011
Messages
3
I have a main form that has the customer balance. I have a tabbed subform that has payments tab and a debits tab. I want the main form to update the balance after I input an amount in either credit or debit amount. I know I have to requery the main forms query but I don't know how it is referenced. In the afterupdate event of the Amount fields , what do I put?
Main form name is : frmAutomailInfoForm
Main form Record Source name is: qryAutomailMain
Text box containing the Balance on main form is named: Balance
 
Just use

Me.Parent.Requery

but you might actually use

Me.Parent.Recalc

instead as it won't cause the records to jump back to the first record where it will if you requery the form.

Oh, and just to be sure - you use PARENT EXACTLY as shown, you don't put the parent form name in there. It is just Me.Parent.Recalc (or .Requery).
 
Bob,
Thanks, the requery one worked but for some reason the recalc didn't work. Is it bacause I have the data sorted wrong? I'm extremely happy to have it work!!! Thanks again
 
Bob,
Thanks, the requery one worked but for some reason the recalc didn't work. Is it bacause I have the data sorted wrong? I'm extremely happy to have it work!!! Thanks again

It really depends on how you have things set up.
 

Users who are viewing this thread

Back
Top Bottom