MS Access: CSng Function
This MSAccess tutorial explains how to use the Access CSng function with syntax and examples.
Description
The Microsoft Access CSng function converts a value to a single-precision number.
Syntax
The syntax for the CSng function in MS Access is:
CSng( expression )
Parameters or Arguments
- expression
- The value to convert to a single-precision number.
Returns
The CSng function returns a single-precision numeric value.
Applies To
The CSng 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 CSng function can be used in VBA code in Microsoft Access.
For example:
Dim LValue As Single LValue = CSng(8.534535408)
In this example, the LValue variable would now contain the value 8.534535408.
Advertisements