Access 2016 Query with Proper Case logic

I am using Access 2016 to import a CSV file, format the data and then export a new CSV.

(The exported CSV must have data in specific columns and specific formats, so that it can be uploaded to the back end of a web app)

Some of the formatting is easy. For example, the web app requires a field called "Address3" to be in column 9.
The data that I am importing will never have an Address 3 field, so in my select query in Access, I just use this expression:
     "" AS Address3

To make sure there are no leading/trailing spaces in my records, I can do something like this:
    Trim(LocationList.City) AS City

The Address fields (Address 1, Address 2 and City) in the source file are always UPPER CASE.
But I need them to be proper case. So I use this expressing in my Access Select Query:
        StrConv(LocationList.Address1,3) AS Address1

This works great, except some parts of the address should NOT be converted to Proper Case.

An example:
    1234 MAIN STREET SW
should be converted to
    1234 Main Street SW  (Not "Sw")

There are a finite number of combinations that should remain in all caps - mainly the directional abbreviations:  NE, SE, SW, NW and perhaps a few more.

Is it possible to write a select Query in Access that does this:
    Convert this field to Proper Case, but leave "NE", "SE", "SW" and "NW" capitalized
And to make it more complicated, only apply this when these combinations of letters stand alone. In other words, either a space before and after or a space before and end of line after, or beginning of line before and a space after.  In other words, "NEWTON" should still convert to "Newton", not "NEwton"

Or maybe a Select Query is not the right place to do this. Maybe when I run the query, it can trigger some code that iterates through each word in the field, and then the information is displayed?

The entire purpose of this Access database is to transform the source data into a specific format, so that it can be exported as a new csv file and uploaded to a different (third party) web application.
LVL 11
ecarboneAsked:
Who is Participating?

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

x
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.

Rey Obrero (Capricorn1)Commented:
try this

Replace(Replace(Replace(Replace(StrConv(Address1, 3) & " ", " Sw ", " SW"), " Se ", " SE"), " Nw ", " NW"), " Ne ", " NE")
0

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
ecarboneAuthor Commented:
I just made one slight modification - I added a blank space after the string. But other than that it worked. Thank you!
0
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.