tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment
Share this page:

MS Access: Concatenate strings together

Learn how to use the Access & operator to conatentate strings together with syntax and examples.

Description

In Microsoft Access, you can concatenate multiple strings together into a single string.

Syntax

The syntax to concatenate strings using the "&" operator is:

string_1 & string_2 & string_n

Parameters or Arguments

There are no parameters or arguments for the & operator.

Applies To

The Concatenation function can be used in the following versions of Microsoft Access:

Example

"new" & "ark" would return "newark"
"Tech on the" & " Net!" would return "Tech on the Net!"
"This " & "is " & "a test" would return "This is a test"

Example (in VBA Code)

The "&" operator can be used to concatenate strings in VBA code. For example:

Dim LSQL as string

LSQL = "Select * from Suppliers"
LSQL = LSQL & " where Supplier_ID = 2345"

Example (in SQL/Queries)

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.

Microsoft Access