Requerying a subform

G

Guest

I have a mainform called ActivityStatus that contains a tab control.

On one of the pages of the tab control is a subform called [LatestIssues
subform] which displays records in continuous form.

I want to requery the subform but do not know the syntax for doing so.
 
S

Sandra Daigle

The tab control has no bearing on the requery - it's just a container for
the subform control and is not part of the reference to it. Here's all you
need:

me.sfrmMySubformControl.requery

Replace "sfrmMySubformControl" with the name of the subform control. Note
that this is not necessarily the same as the name of the form object that is
referenced in the ControlSource of the subform control. To be sure, open the
main form and click once on the subform then check the name property under
the Other tab. Whatever you find there is what belongs in the requery
statement.
 
G

Guest

Depends on where you are when you want do the requery. If you are in an
event witihin the subform it is just Me.Requery. If you are in the main form
it is Me.SubFormName.Requery
 

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