Solved

Cascading Combo Box in ACCESS

Posted on 2013-06-14
4
1,074 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

734 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