In Access, the Round function returns a number rounded to a specified number of decimal places.
The syntax for the Round function is:
Round( expression [,numdecimalplaces] )
The argument number can be any valid numeric expression. The numdecimalplaces argument is is the number of decimal places to round the expression to. If this parameter is omitted, then the Round function will return an integer.
Example
If the expression that you are rounding ends with a 5, the Round function will round the expression so that the last digit is an even number. |
VBA Code
|
This example uses the Round function to round a integer to a specified number of decimals. Now the MyNumber variable would contain the value 2.4.
SQL query
You can also use the Round function in a query.
|