>>
>>ROUND( nValue + 0.5)
>>
>>Will always round up.
>
>Unless nValue is already an integer -- such as 4.0. The ROUND of (4.0+0.5) is 5.0, which I doubt is desirable in this case. You might instead want to go with 0.49 (if that precision is close enough), or use an IIF() statement. (Yes, I know the problems with IIF()s in VB but in this case I doubt that the performance hit will be a real problem:)
>
>ROUND(IIF(ROUND(nValue,0) = nValue, nValue, nValue + 0.5))
Hi,
What about:
Round(CSng(nValue)+0.5)
Just 2 cents.
Igor Gelin
Database Developer