Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Splitting Last First Middle
William Bergman 
    
2 years ago
My campus created a Full Name field and I need to split it, at least in two.

The data is ugly. Something like:

Smith, Claire Eileen
Burger, David H
Goode, William

I am using MS Access 365
This expression works in some cases but not all:
InstFirstName: Right$([Instructor Full Name],InStrRev([Instructor Full Name],", ",-1))
Adam Schwanz  @Reply  
           
2 years ago
Unless there are some rules to the naming convention, you're going to struggle to find something that fits every case.

Does every name have LastName comma space FirstName?
Does every name that has a middle name always follow the firstname with a space and then the name?
Does every name have only 2 or 3 (if middle) names? There are no 2 last names, or titles, Jr. Sr. or anything?
William Bergman OP  @Reply  
    
2 years ago
Hi Adam,

Does every name have LastName comma space FirstName?
YES

Does every name that has a middle name always follow the firstname with a space and then the name?
YES, like the sample

Does every name have only 2 or 3 (if middle) names? There are no 2 last names, or titles, Jr. Sr. or anything?
I haven't seen any, yet,  So far all are 2 or 3 names.
Kevin Robertson  @Reply  
          
2 years ago
You will need 2 Queries for this.

The first Query will give you the Last Name and the First/Middle combination.
The second Query is used to break apart the First Name and the Middle Name/Initial.
Kevin Robertson  @Reply  
          
2 years ago

William Bergman OP  @Reply  
    
2 years ago
Thanks, Kevin!!

I think I misunderstood how Trim worked, I'll give them a whirl, but they will work perfectly.  I'll learn how to give you proper kudos too.
Sincerely,
Bill
Kevin Yip  @Reply  
      
2 years ago
It may be easier to do this in Excel, then copy the results to Access.

If you rely on spaces as delimiters, you may be thrown off by people with double surnames (Andrew Lloyd Webber) or maiden names (Hillary Rodham Clinton).  Sometimes these are hyphenated, but sometimes not.
William Bergman OP  @Reply  
    
2 years ago
@Kevin Robertson, Thank you! An error came up on the FM column so I had to put the length calculation in separate columns.
but it did the trick!

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: 8/18/2026 12:19:45 AM. PLT: 0s