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

how to requery a subform after a record added in another subform

P: n/a
Greetings all,

I have a main form (frmClients) with two subforms (subVisits)
(subAccount). I got the subforms to reflect what the main form is
showing by linking master and child fields (I think--newbie here). Now
I need the second subform (subAccount) to update when I add a visit in
the subVisits subform. I assume that the AfterUpdate would do it, but
I cant figure out what the code is to update another subform would be.
Not Me.Requery but I assume something like it. Any assistance?

Thanks in advance.

DB

Apr 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Where is the second subform located, on the main form or on the first
subform? By your description I assume it is on the main form. If so, the
syntax to requery the second subform from code running in the first subform
would be:

Me.Parent.NameOfSecondSubformControl.Form.Requery

You have to follow the path up to the main form then down to the second
subform going through the subform control on the main form. This control is
where you set the Parent/Child link properties that you mentioned. The name
of the control may or may not be the same as the name of the form that the
control holds.

--
Wayne Morgan
MS Access MVP
"BartonConstruction" <db*****@hvc.rr.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
Greetings all,

I have a main form (frmClients) with two subforms (subVisits)
(subAccount). I got the subforms to reflect what the main form is
showing by linking master and child fields (I think--newbie here). Now
I need the second subform (subAccount) to update when I add a visit in
the subVisits subform. I assume that the AfterUpdate would do it, but
I cant figure out what the code is to update another subform would be.
Not Me.Requery but I assume something like it. Any assistance?

Thanks in advance.

DB

Apr 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.