Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Sync two subforms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard - 29 Mar 2007 00:52 GMT
I have a main form that contains two subforms.  Both subforms have a common
record source.  The first subform is used to input data for single record.  
The second subform is used to display the entire contents of the record
source.

When I enter new record data into the first subform I want to requery the
second subform to reflect the new record in the record source.  The problem I
have is that subform one cannot "see" subform two , therefore, I cannot
requery subform two directly from subform one.  I am thinking it has to be
done in the main form, but I cannot figure out what event in the main form is
appropriate to trigger the requery of subform two.

Sorry for the long explanation.  Help is appreciated.
Signature

Thank you!  Richard

Damian S - 29 Mar 2007 02:08 GMT
Hi Richard,

How about a simple solution like this:  in the after update event of your
first subform, have the following code:

forms!MAINFORMNAME.SUBFORMCONTROLNAME.form.requery

Where MAINFORMNAME is the name of the main form (surprise) and
SUBFORMCONTROLNAME is the name of the subform control on the main form that
houses your second subform (the one you want to requery).

Hope this helps.

Damian.

> I have a main form that contains two subforms.  Both subforms have a common
> record source.  The first subform is used to input data for single record.  
[quoted text clipped - 9 lines]
>
> Sorry for the long explanation.  Help is appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.