user2209682
user2209682

Reputation: 1

Round second decimal up regardless of third decimal

I'm using Access 2010 to append a calculated field into a table [payroll]. The way Access rounds will make a number even but I need access to round the number up regardless of the third decimal spot if there is one (excluding 0 of course) so 20.100 can stay as 20.10 but 20.101 should round up to 20.11.

Examples: 958.165 im getting 958.16 should be 958.17

963.915 im getting 963.92 is correct as 963.92

1232.205 im getting 1232.2 should be 1232.21

1224.235 im getting 1224.23 should be 1224.24

Upvotes: 0

Views: 134

Answers (1)

Mark3308
Mark3308

Reputation: 1333

Use the Round function and add 0.009 to the variable before doing the rounding.

For example:

Dim dblValue As Double
dblValue= 1224.235
dblValue=Round(dblValue + 0.009,2)

Upvotes: 1

Related Questions