Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Access: Removing THE From Title Sorts
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   14 years ago

Q: I am creating a database of my DVD collection in Access 2007 and trying to have them sorted in alphabetical order. How do I write an expression that will not include the word "The" at the beginning of the title when it sorts them?


A: GOOD question.

You would need to create a CALCULATED QUERY FIELD to remove "THE" from the beginning of your title. Something like:

NoThe: IIF(Left(MyTitle,4)="The",Right(MyTitle,Len(MyTitle)-4),MyTitle)

Or you could even make one that tacks the "The" on the end...

NoThe: IIF(Left(MyTitle,4)="The",Right(MyTitle,Len(MyTitle)-4) & ", The",MyTitle)

Oooh yeah, I like that second one. Now drop this into a query as a CALCULATED FIELD, and then base your sort on that field. If you need help with creating calculated queries, here's a free tutorial for you:

/tips/access/calculated-query-fields

Yes, it's in Access 2003 (I don't like 2007 yet) but you should be able to figure it out.

Enjoy.

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Access: Removing THE From Title Sorts
Get notifications when this page is updated
 
 

Check out these other pages that may be of interest to you:

12/9/2022Double Lookup
12/9/2022Expression Is
12/8/2022Access Developer 41
12/8/2022Count Occurrences
12/7/2022Leap Year
12/6/2022Prorated
12/5/2022Edit Mode
12/4/2022Access Save Position Template
12/4/2022Save Position Instructions
12/1/2022Load Faster
 
 

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
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
amicron@gmail.com
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: access tips removing the iif left right len  PermaLink  Access: Removing THE From Title Sorts