This is so important in my laboratory reporting program !
Many thanks
--
Glen
Simple Scientist aka Microbiologist
Brisbane
Australia
The article provides a couple of alternatives: an alternative formula, or a
custom rounding function.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Glen in Australia" <GleninA...@discussions.microsoft.com> wrote in
message
news:F3C7F6B8-2B9E-4467...@microsoft.com...
How can you? Well, a brief Google turned this up:
Public Function FormatSigFig(Value As Double, SigFigs As Long) As String
Dim RoundedValue As Double
Dim Digits As Long
Digits = SigFigs - Int(Log(Abs(Value)) / Log(10)) - 1
FormatSigFig = Int(0.5 + Value * 10 ^ Digits) / 10 ^ Digits
End Function
Seems to work, although I haven't given it much of a test.
If you are ever inclined to use the Access Round function, you should be
aware that it does bankers' rounding, not arithmetical rounding.
"Glen in Australia" <GleninA...@discussions.microsoft.com> wrote in
message news:F3C7F6B8-2B9E-4467...@microsoft.com...