totn Access Functions

MS Access: CStr Function

This MSAccess tutorial explains how to use the Access CStr function with syntax and examples.

Description

The Microsoft Access CStr function converts a value to a string.

Syntax

The syntax for the CStr function in MS Access is:

CStr( expression )

Parameters or Arguments

expression
The value to convert to a string.

Returns

The CStr function returns a string value.

Applies To

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

  • Access 2019, Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

Example in VBA Code

The CStr function can be used in VBA code in Microsoft Access.

For example:

Dim LValue As String

LValue = CStr(8)

The LValue variable would now contain the string value of "8".