In Access, the Space function returns a string consisting of the specified number of spaces.
The syntax for the Space function is:
Space( number )
The argument number specifies the number of spaces you want in the string. It can be of any numeric data type, but is rounded to a Long and must be between 0 and approximately 65,535, inclusive.
Example
|
VBA Code
|
This example uses the Space function to return a string consisting of a specified number of spaces. Now the MyString variable would contain the value ” “, and the MyStr variable would contain the value “test string”
SQL query
You can also use the Asc function in a query.
|