C
Cathy via AccessMonster.com
Hi,
I have the following code for some calculations. The code works fine for
whole numbers, however if I have decimal entries, both DMax and DMin round
the numbers and my calculations are then way off. It's odd that DAvg doesn't
round the numbers. I've tried using Format, but doesn't appear to be working.
Any suggestions?
' Calculations on the test table
Dim docal As Double
Dim docal2 As Double
Dim docal3 As Double
docal = DMax("[DOcalc]", "stabilization_calcs", "[DOcalc]")
docal2 = DMin("[DOcalc]", "stabilization_calcs", "[DOcalc]")
docal3 = DAvg("[DOcalc]", "stabilization_calcs", "[DOcalc]")
Thanks in advance.
I have the following code for some calculations. The code works fine for
whole numbers, however if I have decimal entries, both DMax and DMin round
the numbers and my calculations are then way off. It's odd that DAvg doesn't
round the numbers. I've tried using Format, but doesn't appear to be working.
Any suggestions?
' Calculations on the test table
Dim docal As Double
Dim docal2 As Double
Dim docal3 As Double
docal = DMax("[DOcalc]", "stabilization_calcs", "[DOcalc]")
docal2 = DMin("[DOcalc]", "stabilization_calcs", "[DOcalc]")
docal3 = DAvg("[DOcalc]", "stabilization_calcs", "[DOcalc]")
Thanks in advance.