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 / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

Synchronizing two forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Victoria - 28 Mar 2007 02:53 GMT
I'm looking for a proper way to do something that i think is probably simple.

Lets say frmA has cboA, whose AfterUpdate event is used to populate the
form.  Similarly, frmB has cboB, whose AfterUpdate event is used to populate
the form.  

Code ensures that both forms are either open or both closed.  (I have a
reason for doing this on two forms instead of one) As well, cboA and cboB
have exactly the same records to choose from.

Here is what I want to do: If the user changes the selection in cboA, I need
this change reflected in cboB as well.  In addition, the AfterUpdate code for
both cboA and cboB would have to run to synchronize the populating of both
forms.  If the user changes cboB, the mirror image process should happen.  
This ought to be easy, but I'm messing up my syntax somehow.  How should i
proceed?

thanks
Marshall Barton - 28 Mar 2007 20:20 GMT
>I'm looking for a proper way to do something that i think is probably simple.
>
[quoted text clipped - 12 lines]
>This ought to be easy, but I'm messing up my syntax somehow.  How should i
>proceed?

Strange thing to do, but that's up to you.  

The first thing to do is to move the code that populates the
form to a separate Public procedure (named PopulateMe) in
its form module.

cboA's AfterUpdate event would be like:

PopulateMe
Forms!frmB.cboB = Me.cboA
Forms!frmB.PopulateMe

similarly for cboB

Signature

Marsh
MVP [MS Access]

 
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.