Access - First Name Field, Remove Middle Initial or Middle Name

I have tried using the following formula:

Trim(Left([Cleaned Name],InStr([Cleaned Name]," ")))

to get just the first name from a first name field that may or may not have a middle initial or middle name. However, the resulting output is the first name only if there was a middle name or middle initial. However, the first name field is blank if there was not middle name/initial.


Crystal Janice returns Crystal
Crystal J returns Crystal


Crystal doe not return anything

Thank you.
exp vgAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try it this way

Split({Cleaned Name}," ")[1]


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
exp vgAuthor Commented:
I tried this, and got a syntax error.

I also tried changing the } to ]
exp vgAuthor Commented:
I try this

trim(split([First Name]," ")(0)

And I get an error statement that there is an invalid dot (.) or !

Thank you.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

exp vgAuthor Commented:
Or the error also has an invalid parantheses. I am trying to modify and it is not working.
exp vgAuthor Commented:
I changed to this

trim(split([First Name])," ")(0)

And am getting the statement that I have an invalid number of arguments.

Thank you.
exp vgAuthor Commented:
Thank you - this is getting me closer - but not quite there.
Sorry, this showed up in my Crystal Reports folder.  I see you want it in MS Access

Try this

IF InStr([Cleaned Name]," ") > 0 then
    Trim(Left([Cleaned Name],InStr([Cleaned Name]," ")))
     [Cleaned Name]

exp vgAuthor Commented:
Thanks so much:

I tried

IF InStr ([First Name]," ") > 0 then Trim(Left([First Name],InStr([First Name]," "))), Else[First Name]

but there is a formatting issue I am unable to catch
Dale FyeOwner, Developing Solutions LLCCommented:
Did you even try the function I provided the other day in this response to an almost identical post?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.