Update subforms

C

celineusa

Hi All!

On a main form, I have a subform (1) which is a continuous form that
displays records from table A. On the Form Footer of that subform, I
have a button that open another continuous form in a popup (2). On that
popup continuous form, I have a button next to each record that adds
the record to table A and then close the popup form.
Now, I would like subform (1) to update the results from table A as
soon as form (2) is closed.
I know that the code has to be when I click on the button... I tried:
Me.Parent.Subform1.Form.Requery
Me.Parent!Subform1.Form.Requery
The same without parent, the same without form, but each time, I get
different error messages...
Any suggestions?

Thank you
Celine
 
J

John Vinson

Me.Parent.Subform1.Form.Requery
Me.Parent!Subform1.Form.Requery
The same without parent, the same without form, but each time, I get
different error messages...
Any suggestions?

The popup form is altogether independent of the main form. It has no
Parent property.

Try

Forms!MyMainForm!subform1.Requery

John W. Vinson[MVP]
 

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