Requery Sub Forms

G

Guest

I have a form containing a Tab control that has 3 seperate Tab Pages. On each
page there is a form in single view and a sub form in Continuous Forms View.
The First Tab is used for Data Entry. The Form and Sub Form on the Second Tab
displays the records that have a status of "Unresolved". The Form and Sub
Form on the Third Tab displays the records that have a status of "Resolved".
When the user changes the status of a record on the Unresolved Tab, I would
like the forms to refresh so that when the one moves from one tab to the
other, the changes are immediately displayed. I attempted to put
"DoCmd.Requery" on the On Change event of the tab control, but it does not
work.
 
A

Arvin Meyer [MVP]

Try this in the AfterUpdate event of the first subform:

Me.Parent.NameOfSub2.Form.Requery
Me.Parent.NameOfSub3.Form.Requery

Me is the current form, Parent refers to the main form, NameOfSubn is the
name of the respective subform controls (not necessarily the name of the
subform) then you requery the Form property of the subform control.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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