Solved

Cascading Combo Box in ACCESS

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

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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.
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now