Synchronize Two Combo Boxes on a Form

C

Combo_novice

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.
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top