0

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

HansUp
  • 95,961
  • 11
  • 77
  • 135
  • Are you using `ROUND` or `ROUNDUP` – Raj More Nov 18 '14 at 15:29
  • @rajmore, I do not believe ROUNDUP exists in MS Access. To the OP, you might like to look at http://stackoverflow.com/questions/137114/how-to-round-in-ms-access-vba/266745#266745, format will give a round up for 5 or greater, rounding up for numbers below that gets more complicated. – Fionnuala Nov 18 '14 at 15:37

1 Answers1

1

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)
Mark3308
  • 1,298
  • 11
  • 22