Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to USA First    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
UNION Query Solution
Kevin Yip 
     
2 years ago
In a case like this, I would create a list with only USA, Canada, and UK, then UNION it to a list that has everything else.  That way, I don't have to create a separate sort order.  The combo box's row source would look something like:

     SELECT a.CountryID, a.CountryName FROM CountriesT AS a
     WHERE a.CountryID IN ("USA", "CAN", "UK")

     UNION

     SELECT b.CountryID, b.CountryName FROM CountriesT AS b
     WHERE b.CountryID NOT IN ("USA", "CAN", "UK")

Richard Rost  @Reply  
          
2 years ago
Another excellent solution. One of the things I love about Access is that there are always a million different ways to do things. I often try to approach a problem from two angles. One, I try to put together a simple solution for beginners that don't necessarily understand what union queries are or don't want to learn VBA. And then two, I try to put together the more advanced solution for the VBA/SQL junkies.

So it's always great to see different opinions from people and different ways of doing things. I love that.
Kevin Yip OP  @Reply  
     
2 years ago
Thanks.  Of course, if a specific order is needed that can't be had otherwise, your method is the only way: create that specific order.

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

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/30/2026 5:43:14 PM. PLT: 1s