Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   News   Courses   Tips   Templates   Forums   Help   Order   Contact   Logon  
Access: Removing THE From Title Sorts
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   5/17/2008 3:50:03 AM

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:


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


Post a New Comment or Question
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

8/5/2020Access Custom Sequential Number
8/4/2020Access Restore Deleted AutoNumber
8/1/2020Access Custom Sort Order
7/30/2020Access SharePoint Seminar
7/29/2020Microsoft Access Developer 16
7/29/2020Is There a Free Version of Access?
7/28/2020Access Disallow Editing Data
7/25/2020Access NZ Function NULL to Zero
7/24/2020Access Link Parent Child Same Table
7/23/2020Access OnCurrent Event TechHelp

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Account Login
Online Theater
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Waiting List
Production Schedule
Collapse Menus
Live Chat
Customer Support
WalkThru Tutorials
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
MYOLP Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Live Chat
General Info
Support Policy
Contact Form
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

YouTube Channel    LinkedIn

Blog RSS Feed   
Keywords: access tips removing the iif left right len  PermaLink