Main / Sub Form

O

O....

I have a main form, the user selects the criteria and passes the parameter to
the underlying query of the subform how do I refresh the sub form.
 
T

Tom van Stiphout

On Thu, 8 Oct 2009 06:20:01 -0700, O.... <[email protected]>
wrote:

Me.mySubformControl.Form.Requery

Or you could apply the criteria to the subform's Filter property:
With Me.mySubformControl.Form
.Filter = strMyFilter
.FilterOn = True
End With
No requery required.
(of course you replace myObjectNames with yours)

-Tom.
Microsoft Access MVP
 
O

O....

when tou say " mySubformControl " do mean subform Name? and does it work
with a datasheet view.
 
D

Douglas J. Steele

No, Tom means the name of the subform control on the parent form. Depending
on how you added the subform, the name of the subform control can be
different than the name of the form being used as a subform.
 

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