A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Synchronize Two Combo Boxes on a Form



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2009, 04:44 AM posted to microsoft.public.access.forms
Combo_novice
external usenet poster
 
Posts: 1
Default Synchronize Two Combo Boxes on a Form

I am a newbie to Access and am currently using Access 2007 and need help with
synchronizing two combo boxes on a form.
I have read through many of previous discussions and some of the suggested
links but none have seemed to help so far.

I have 2 tables one with Regions and one with States.
I would like to to create a combo box on a form, so that when I choose a
region it will automatically fill in the region's state.
  #2  
Old October 27th, 2009, 05:33 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Synchronize Two Combo Boxes on a Form

On Mon, 26 Oct 2009 21:44:03 -0700, Combo_novice
wrote:

I have 2 tables one with Regions and one with States.
I would like to to create a combo box on a form, so that when I choose a
region it will automatically fill in the region's state.


Base the Region combo box (cboRegion I'll call it) on a Query like

SELECT Regions.RegionName FROM Regions ORDER BY RegionName;

adapting the fieldnames appropriately of course.

Base the States combo on a query like

SELECT States.StateName FROM States WHERE
States.Region=Forms!YourFormName!cboRegion
ORDER BY StateName;

adapted again as needed...

Put a Macro in the AfterUpdate event of cboRegion to Requery the States combo.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.