Solved

Cascading Combo Box in ACCESS

Posted on 2013-06-14
4
1,045 Views
Last Modified: 2013-06-24
I have a list of names (consists of Last Name and First name fields) in my table and like to create cascading combo boxes :
When I select the last name in the last_name combo box and tab over to next combo box, I want the first names in alphabetical order that has the same last name.

Last Name    First Name
----------------    ------------------
Brown          Bobbie
Brown          Jim
Jackson         Adam
Jackson         Bobby
Jackson         Issac
Jackson         Jack
Jackson         Toni
Johnson        Sam
Johnson        Lonnie
0
Comment
Question by:sglee
  • 2
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 265 total points
ID: 39248917
Simple enough.

Base the 2nd combo's rowsource on a query.  In that query, create a column for LastName and under that, put a criteria check of:

=Forms![<yourformname>]![<yourlastnamecontrolNam>]

replace everything in the < > (and including them) with the name of your form and control.

Now in the 1st combo's AfterUpdate event, do:

  Me.<my2ndCombo'sControlName>.Requery

 This will force combo 2 to execute the rowsource query, which will then filter based on the 1st combo's value.

Jim.
0
 

Author Comment

by:sglee
ID: 39248948
Could you post actual screenshots of the queries and control properties?
0
 
LVL 57
ID: 39251261
Just give it a shot.  It's not all that hard.   Should take you no more then ten minutes at most (I'm assuming you already have the rowsource queries setup for the combo's, but even if not, it's still not all that hard).

 If you really get stuck, I can whip something up.

Jim.
0
 

Author Comment

by:sglee
ID: 39273530
That works! Thank you.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question