In Access, the Str function returns string representation of a number.
The syntax for the Str function is:
Str( number )
The required number argument is a Long containing any valid numeric expression. When numbers are converted to strings, a leading space is always reserved for the sign of number. If number is positive, the returned string contains a leading space and the plus sign is implied.
Example
|
VBA Code
|
This example uses the Str function to return a string representation of a number. Now the MyString variable would contain the value ” 367 “.
SQL query
You can also use the Str function in a query.
|