473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

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
1 2482
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Uwe Range | last post by:
Hi to all, I am displaying a list of records in a subform which is embedded in a popup main form (in order to ensure that users close the form when leaving it). It seems to be impossible to...
1
by: sixsoccer | last post by:
I have built a database with a <Mainform> and a <Subform>. My problem is twofold. 1. My subform is set as a continuos form with AllowAddiotions set to NO (ie. a list of Issues to the client on...
7
by: kevin.jonas | last post by:
Let say I have a form called "frmMachineSpecs" witht wo subforms, "frmSpecs" and "frmMachines". Both subforms are in datasheet view. The first control in "frmSpecs" is "txtOEM_No". I want to...
3
by: panwala_bhavesh | last post by:
I have a subform in continuous form style that I use to populate 3 fields (textboxes) on my main form with a double-click of the key-field textbox of the sub: Private Sub...
4
by: Ryan | last post by:
I've got a little bit of code that runs when you enter data in a datasheet view (which is a subform of the form you are in) if rst!DateReceived >= 30 Then Forms!DisposalRecords.Label90.Caption =...
1
by: Drum2001 | last post by:
Hello All, This seems like it would be simple. Is there a way to have an "After Update" event from Subform1 trigger an "add new record" on Subform2? I see posts to go from Mainform to...
13
by: BASSPU03 | last post by:
Hello, folks. This is my first post and I only began to work extensively with Access about 3 weeks ago. I'm running Access 2003 on Windows XP. I'd like a textbox in subform2 to reflect the value...
1
by: stuart | last post by:
I have a list of records in a subform that a user can either edit or delete. This is an unbound form. If the user deletes a record, I want to refresh the form, and then position the cursor on the...
1
by: cmbirk | last post by:
I have a main form that contains 2 subforms. One subform is a regular single form, but the other is a multi-item subform. Both forms have a project ID field that I would like to link. What I would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.