Question : How can I round to the nearest 5 cents

I am trying to round to the nearest nickel using the expression builder in Access.  What should this expression look like.

Answer : How can I round to the nearest 5 cents

Here is a function which will do the rounding to nearest 5 cents.

Public Function RndNickel(Amount As _ Currency) As Currency
Dim Temp As Currency
   Temp = Fix(Amount * 20 + 0.5)
   RndNickel = CCur(Temp / 20)
End Function

This function works for positive numbers only!  If you wish to round negative numbers, check for negative, change to positive and return negative result if test was negative.
Random Solutions  
 
programming4us programming4us