By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,117 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,117 IT Pros & Developers. It's quick & easy.

Program equivelent of "Records refresh"

P: n/a
Hi:

I have a Pop Up form that involves a main form and sub form. The sub form has the results
of a query on the main form.

I need to automatically perform exactly he same action that takes place when I manually
click "Records/refresh" when I update a field on the main form, but am having trouble
making that happen. Me.Refresh does not do it, and neither do any of the other things that
I have tried. "Records refresh" has the effect of updating the query in the sub form,
based on changes to the main form. This is what I need to have happen programmatically.

Help..Please

John Baker
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If Me.Refresh was being run from the main form, it would refresh the main
form. The Me keyword refers to the form or report that the code is running
on. To refer to the subform, you first need to refer to the subform control
on the main form, then to the subform.

Example:
Me.ctlNameOfSubformControl.Form.Refresh

If refresh doesn't work, try requery or recalc.

--
Wayne Morgan
Microsoft Access MVP
"John Baker" <Ba******@Verizon.net> wrote in message
news:23********************************@4ax.com...
Hi:

I have a Pop Up form that involves a main form and sub form. The sub form
has the results
of a query on the main form.

I need to automatically perform exactly he same action that takes place
when I manually
click "Records/refresh" when I update a field on the main form, but am
having trouble
making that happen. Me.Refresh does not do it, and neither do any of the
other things that
I have tried. "Records refresh" has the effect of updating the query in
the sub form,
based on changes to the main form. This is what I need to have happen
programmatically.

Help..Please

John Baker

Nov 13 '05 #2

P: n/a
Thanks..that works
"Wayne Morgan" <co***************************@hotmail.com> wrote:
If Me.Refresh was being run from the main form, it would refresh the main
form. The Me keyword refers to the form or report that the code is running
on. To refer to the subform, you first need to refer to the subform control
on the main form, then to the subform.

Example:
Me.ctlNameOfSubformControl.Form.Refresh

If refresh doesn't work, try requery or recalc.


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.