Refresh SubForm (easy)

B

Bryan

I have two subForms on one main form. How do I refresh all
three forms from one of the sub forms, any event will work,
I may use on lost focus. Each time I try something Access
tells me the form is not open???
 
J

John Vinson

I have two subForms on one main form. How do I refresh all
three forms from one of the sub forms, any event will work,
I may use on lost focus. Each time I try something Access
tells me the form is not open???

A Subform is NOT "open" in its own right. It's not part of the Forms
collection.

To refresh a Subform, you need to refresh via the main form,
referencing it by the Name property *of the Subform control which
contains the form* - note that this will often be the same as the name
of the form within that control, but not necessarily!

Forms!mainform!subformcontrol.Form.Refresh

should do it, given the actual names of your main form and subform
control.
 

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