Requery subform

  • Thread starter Thread starter Theresa
  • Start date Start date
T

Theresa

I have a main form which contains 2 subforms on a tab control. Both subforms
are based on the same query. When I add records to the subform on the first
tab, some information should automatically populate the subform on the 2nd
tab. If I close the form and reopen it, or go to design view and back to
form view, the query is re-run and the 2nd subform refreshes. I have tried
putting me.requery as an event procedure in the tab control on change event,
but it still does not work. What am I doing wrong?
 
You need to requery the subform, not the main form. In your code on the Tab
control's Change event, use this:

Me.NameOfControlHoldingSubform.Form.Requery
 
Back
Top