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 
Ascending a form field
William Kennedy 
    
3 years ago
I have a single field helper form that is used in a table combo.  I often add data or edit data to the form field.  Is there a way to sort the the field when the form is open?
Kevin Robertson  @Reply  
          
3 years ago
The is an option to sort the Combo Box in the wizard.
You can also edit the Row Source and add an Order By clause.
SELECT ID, FieldName FROM TableName ORDER BY FieldName;
William Kennedy OP  @Reply  
    
3 years ago
Hello Kevin again.   Thanks!  For some reason I could not sort in combo bow with wizard.
William Kennedy OP  @Reply  
    
3 years ago
I did not make myself clear, I think. Sorry. The Table AuthorT is used as a Combo Box field source for another Table, BookT.   Right now, we are beginning to categorize many hundreds of these Books. They are all books about Freemasonry.  There are a limited number of Authors who wrote these books throughout the last three hundred plus years, maybe about 150 authors.  Many Authors wrote 5 to 20 different books each.   I use a Form to update the AuthorT field.   Some of these books by an Author, are printed in different languages and different counties.  Some analysis is required by the user at that time.  I'm hoping that using the Form, AuthorF, I can enter names into the table AuthorT and that the table will be sorted before I enter a new Author to make sure that I don't add the same Author's name twice.  Remember, the info in the book may be in a different language or printed by a different Publisher that looks slightly different then another book written by the same author.    It would be a great help to see the Authors in a sorted order while trying to add what we think might be a new Author/book.
William Kennedy OP  @Reply  
    
3 years ago

William Kennedy OP  @Reply  
    
3 years ago

William Kennedy OP  @Reply  
    
3 years ago

Kevin Robertson  @Reply  
          
3 years ago
To sort the records by Author in a Continuous Form set the Record Source of the Form to an SQL statement.
I put together an example for you (see screenshot). The code also checks for duplicates.

Check out these videos for more info:
Intro to VBA
Before Update
After Update
AfterUpdate & DLookup
DLookup
NZ Function
If Then
MsgBox
Kevin Robertson  @Reply  
          
3 years ago

William Kennedy OP  @Reply  
    
3 years ago
Thanks that really worked and now I understand.

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: 6/22/2026 11:43:06 AM. PLT: 1s