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

Other Sites

CheckYourMath BigActivities
Share this page:

MS Access: Trim Function

Learn how to use the Access Trim function with syntax and examples.

Description

The Microsoft Access Trim function removes leading and trailing spaces from a string.

Syntax

The syntax for the Microsoft Access Trim function is:

Trim ( text )

Parameters or Arguments

text is the string that you wish to remove spaces from.

Applies To

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

Example

Trim ("  Tech on the Net") would return "Tech on the Net"
Trim ("  Alphabet  ") would return "Alphabet"

Example (in VBA Code)

The Trim function can be used in VBA code in Microsoft Access. For example:

Dim LResult As String

LResult = Trim ("   Alphabet   ")

The variable LResult would now contain the value of "Alphabet".

Example (in SQL/Queries)

You can also use the Trim function in a query in Microsoft Access.

Microsoft Access