Concatenate

  • Thread starter Thread starter Bdavis
  • Start date Start date
B

Bdavis

I must be blind or have a bad memory but, I could have
sworn that you could concatenate two fields in an
expression of a query. However, Concatenate does not seem
to be a function in Access. Am I missing something?

-Ben
 
I must be blind or have a bad memory but, I could have
sworn that you could concatenate two fields in an
expression of a query. However, Concatenate does not seem
to be a function in Access. Am I missing something?

-Ben

The & operator and the + operator (with Text fields) both concatenate
values. They are subtly different: [FieldA] & [FieldB] will treat a
NULL value in either field as an empty string, returning just the
non-NULL field; [FieldA] + [FieldB] will return NULL if either field
is NULL. This can be handy in an expression like

[FirstName] & (" " + [MiddleName]) & " " & [LastName]

to suppress the extra blank if there is a NULL middle name.
 
Back
Top