Building concatenation in access

S

Sue at VLS

Hello, I want to prepare an update query which will
concatenate other fields (first name, middle name, last
name) into a "name" field. I can do this but my problem
is that sometimes a middle name is blank and I can't seem
to trim the spaces out of it. I've tried RTrim but
doesn't seem to work.

Any thoughts?

Thank you in advance.

Sue
 
C

Cheryl Fischer

Try this:

([First name] + " ") & ([Middle Initial]+ " ") & ([Last name])



hth,
 
L

Lynn Trapp

[FirstName] & " " + [MI] & " " & [LastName]

Using the plus sign to concatenate the Middle Initial will eliminate the
null values.
 
G

GaryS

Here's how I use Trim in a similar circumstance (to form a
botanical name out of genus, species, and variety):

Trim([First name] & " " & Trim([Middle Initial]& " " &
[Last name]) )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top