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 
Combo Box
William Kennedy 
    
4 years ago
I need to select an Office Title field within a Table with a Combo box and each Office Title field has an associated ranking number in the second field of the Combo box.  That ranking is used to sort the offices in rank in queries.  How do I bring in the two fields from one combo box into the table?
Adam Schwanz  @Reply  
           
4 years ago
I'm having a hard time understanding what you're asking, can you elaborate some more?

Assuming you're asking something like I have Store A with a rank 6 and Store B with a rank 3, then I want to sort queries based on the value there? Does this combobox have a control source or did you type in the values when you made the combo box? If I'm understanding correctly, I think you'd get some use from Relational Combo
William Kennedy OP  @Reply  
    
4 years ago
Example:  Table tblOffice used as Combo.  Two fields Title and Rank.  Another table tblland has combo box field that pulls Tile and shows rank.  Instead of adding the number in Ranking field  is there a way to automatically bring Rank data into Ranking Field?
William Kennedy OP  @Reply  
    
4 years ago

William Kennedy OP  @Reply  
    
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
See Evil Access Stuff. Lookup values inside the tables are not fun. I would suggest changing it to that relational combo video I sent.

But you should be able to do HName.Column(2) to get the number value from that.
Scott Axton  @Reply  
        
4 years ago
William
If what I'm understanding is you don't want your combo box sorted alphabetically by OfficeTitle you want it sorted by Rank, I believe that the Custom Sort Order video fits right in with your needs.

If you don't need / want to see the rank in your combo just make it's width 0 (zero).  It will still be there to order the choices in the Combo Box.
Scott Axton  @Reply  
        
4 years ago
I just noticed the second part of your question - is there a way to automatically bring Rank data into Ranking Field?

First yes there is a way.  See Adam's response.
Second, I don't recommend storing that in multiple tables. (What if your sort order changes?)

To clarify:
To store a second value that is in the combo box using your picture 1 example, you would need to set the default value property of Ranking to the third column of your combo box HName.
Remember that Combo Boxes are zero based.  So ID is 0, OfficeTitle is 1, and Rank is 2

Ranking default value  = HName.Column(2)
-------

The better way would be to use the custom sort in a query for ordering your records.  You could use DLookup to figure out the sort order but that has the potential to slow down your database greatly depending how many records you have.

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/2/2026 8:54:54 AM. PLT: 1s