Solved

Cascading Combo Box in ACCESS

Posted on 2013-06-14
4
1,067 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

756 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