Form Recordset Update from Action on another Form

J_Cat

Registered User.
Local time
Today, 03:11
Joined
May 7, 2012
Messages
12
Hi All,

I'm on tabbed form [FORM1] and I'm looking to requery (refresh) the recordsource on Tab A, subform A, based on activity (e.g. checking a checkbox) in Tab B, Subform B.

Does anyone know how to use VBA to force a refresh on a subform's recordsource without that subform being currently visible to the user?
:banghead:

Thanks in advance!
John
 
Try:
Me!OfSubformAControlName.Form.Requery
in the after update event of the checkbox. You will need to substitute OfSubformAControlName with the name of the control that holds the subform to be requeried.
 
Check out this link for the correct syntax for referring to form/subforms, their control and properties from various relative locations.

So in your instance in the On Click event of your check box you could use some code along the lines of;
Code:
Forms!Mainform!Subform1.Form.Requery
 
Thanks all,
I took that advice and it seems like it's doing the trick!
JO
 

Users who are viewing this thread

Back
Top Bottom