Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Cascading Combo Box Same Table
Kim Boren 
      
6 months ago
On a form I would like to have a lastname combo box and a firstname combo box cascaded from the last name combo box. Both lastname and firstname are on the same table. Also there are multiple lastnames that are the same, ie... Smith, Petersen etc. I  have created cascading combo boxes from two different tables, however not from the same table. Can someone point me the direction to learn how to do this?
Thanks,  
Kim
Alex Hedley  @Reply  
           
6 months ago
What's the purpose of having them as pickers?
Richard Rost  @Reply  
          
6 months ago
Interesting problem. I would create an aggregate query for last names so you only see a unique list of those. Then, once you pick "Smith" then all of the individual Smiths would appear in the first name combo box. That would be the bound box. At least, that's how I'd do it. This would actually make a cool video. I'll add it to my list.
Kim Boren OP  @Reply  
      
6 months ago
I have thousands of names in my database. When I am on a form and want to change individuals I want to type in the lastname and have the firstnames show to pick from and the form will be open to the individual picked. Perhaps there would be a better way to accomplish this other than cascading combo boxes?
Kim
Donald Blackwell  @Reply  
       
6 months ago
I think the two cascading combo boxes you originally thought of would be the easiest.

Like Richard said, the first would be based on an aggregate query from your table that just shows last names; it could be a 1-column combo. It will be an interesting video.

The 2nd combo would be two columns but 3 fields, column 1, the record ID and the column 2, first name. The third field in the query would be last name not shown but it would have the criteria set to match the value of the last name combo. You may want it to be hidden or disabled until the last name is selected.

In the after update event of the lastname combo, you would just requery the firstname combo and enable it and/or make it visible.

Either with a button, with a double click event or in the after update event of the first name field, would be the openform code.

Richard Rost  @Reply  
          
6 months ago
The first combo would be last name based on an aggregate query of all the last names. The second combo would be a list of first names, and this one I wouldn't aggregate; I would just show them all. Then, in the second column of the 2nd combo box, have some other field that would allow you to distinguish them (maybe their street address or their phone number). Whatever you can use to pick, so if you got five Joe Smith's, you pick Smith first, then you'd see all five Joe's, but with Joe, you'd see all of the different addresses for the Joes so you can pick the correct one.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 5:41:36 AM. PLT: 1s