This MSAccess tutorial explains how to use the Access "&" operator to conatentate strings together with syntax and examples.
In Microsoft Access, you can concatenate multiple strings together into a single string with the "&" operator.
The syntax to concatenate strings using the "&" operator in MS Access is:
string_1 & string_2 & string_n
There are no parameters or arguments for the "&" operator.
The "&" operator can be used in the following versions of Microsoft Access:
Let's look at how to use the "&" operator in MS Access:
"new" & "ark" Result: "newark" "Tech on the" & " Net!" Result: "Tech on the Net!" "This " & "is " & "a test" Result: "This is a test"
The "&" operator can be used to concatenate strings in VBA code.
Dim LSQL as string LSQL = "Select * from Suppliers" LSQL = LSQL & " where Supplier_ID = 2345"
You can use the "&" operator in a query to concatenate multiple fields into a single field in your result set.
To do this, open your query in design mode. Enter your field names in the query window separated by the "&" symbol.
In this query, we have used the "&" operator as follows:
Expr1: [FirstName] & " " & [LastName]
This query will return the concatenation of the FirstName field , a space character, and the [LastName] field. The results will be displayed in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.
FullName: [FirstName] & " " & [LastName]
The results would now be displayed in a column called FullName.
(scroll to see more)