Function AsymArith(ByVal X As Double, _
Optional ByVal Factor As Double = 1) As Double
AsymArith = Int(X * Factor + 0.5) / Factor
End Function
When I use it as follows :-
Private Sub Billable_Hours_AfterUpdate()
Me.TxtCost = Me![Billable Hours] * Me![TxtRate]
Me.TxtCost = AsymArith(Me.TxtCost, 100)
End Sub
I get the following result :-
Billable Hours(1.5) * TxtRate(4.09) = 6.135
Rounded to 6.13 NOT 6.14
there are any number of rounding procedures (function) in these fora (Tek-Tips) use advanced search with just the term "Round". At least one of these permits the specification of the precision (# decimal places).
That is not possible. That function only rounds to integers. But if you use the one I provided and set the precision to 2 decimal places the answer is 6.14.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.