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 
Sorting Comboboxes in Subforms
Amir Ouranus 
      
37 days ago
Hello everyone,
I have an employee database that stores the usual information. I’ve created Phone and Email sub forms because we need to track all employee phone numbers and email addresses—both personal and work-related. Some employees have multiple phone numbers and multiple email addresses.
In these sub forms, I use combo boxes that allow the user to select the type of phone number or email address. The issue I’m having is that I want to sort the Phone Type and Email Type so that work-related entries appear first, followed by personal ones. For example, personal email addresses should appear after work email addresses.
A bit more background on my database: for my combo boxes, I followed Richard’s advice and created separate “List Tables” to serve as the data source. Each list table includes a “Sorting Number” column so I can control the order of the items.
As always, any help would be greatly appreciated!
Juan Rivera  @Reply  
            
37 days ago
Custom Sort Order
This may help if not let us know you might need to show us what you are trying and your code.
Amir Ouranus OP  @Reply  
      
37 days ago
Hi Juan,
That is exactly what I have done, but when I open a specific employee and fill in their phone numbers and email addresses in the sub Form, the sub form doesn't sort.
Alex Lewis  @Reply  
       
37 days ago
Your Row Source is usually an SQL statement. Just add an ORDER BY clause and the field you wish to sort by.
Juan Rivera  @Reply  
            
36 days ago
show us what you got im sure we can work through this.
Amir Ouranus OP  @Reply  
      
36 days ago

Amir Ouranus OP  @Reply  
      
36 days ago

Amir Ouranus OP  @Reply  
      
36 days ago

Amir Ouranus OP  @Reply  
      
36 days ago
Please let me know if you need more screenshots.
Amir Ouranus OP  @Reply  
      
36 days ago
In the first screenshot; I want the order of the phone numbers to always be:
Primary
SIP
smtp
Alias
Business
Assistant's Email
Personal
Broker Main
SIP - Terminated
Alias - Terminated
Other
Kevin Robertson  @Reply  
           
36 days ago
Also add a sort order to the Record Source of the Subform.
Amir Ouranus OP  @Reply  
      
36 days ago
The SQL code above is from the Subform.
However, any code added to the Record Source of the Subform will make the list disappear.
Kevin Robertson  @Reply  
           
36 days ago
It looks like the Row Source of the Combo Box. The underlying Table of the subform sours object (the form displayed in the subform control) will also need its own Sort Order if you want to order those records a specific way.

Note: Try not to start any of your object names (or field names) with a number. Doing so may cause problems later.
Amir Ouranus OP  @Reply  
      
36 days ago
When you say Object Names do you mean Tables, Forms, Query and Reports?
Kevin Robertson  @Reply  
           
36 days ago
That is correct.

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: 4/13/2026 7:05:14 AM. PLT: 1s