I'm trying to truncate the decimals from a calculation that I'm making in a query. I have the following function but it returns 0 (zero) for all of my values.
The expression in my query is as follows:
For example:
WOH = 82.33
OHB = 19
AvgStoreSales = .2307
The calculated value before using the RndDn function is 16.693
I want the value to be 16
When I added the RndDn function it is returning 0 (zero)
Any thoughts?, comments? --------------------------------
Fortius, Citius, nullis secundus
Strength, Speed, second to none
Code:
Public Function RndDn(MyNum As Double) As Integer
Dim lngResult As Long
lngResult = Int(MyNum)
MyNum = lngResult
End Function
Code:
Send_Back_Qty: RndDn(IIf([WOH]>10,[OHB]-[AvgStoreSales]*10,0))
WOH = 82.33
OHB = 19
AvgStoreSales = .2307
The calculated value before using the RndDn function is 16.693
I want the value to be 16
When I added the RndDn function it is returning 0 (zero)
Any thoughts?, comments? --------------------------------
Fortius, Citius, nullis secundus
Strength, Speed, second to none