471,078 Members | 766 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,078 software developers and data experts.

Program equivelent of "Records refresh"

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
2 2199
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
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.

Similar topics

2 posts views Thread by Bill Cohagan | last post: by
1 post views Thread by Chumley Walrus | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.