Hi people,
How can I dim a variable to become an decimal datatype. I need as many decimal points as I can because of a precise calculation.
I have this now and as you can see I used Double as it appears to give the longest decimal place.
Function giveperc(CalcType As Integer, Template As Long, Cat As Long, Score As Double) As Double
But... it is not long enough.. I did a Manual calculation after and it gives close values but not close enough I had on the end variations up to 5%, and it can only have to do with the fact that it is rounding the numbers.
The function above returns a Value that get's used in a create table Query, and I tried to look what type it creates the field as, and it creates it as a Number/Double.
How do I get more decimals? I know there is a 14Byte datatype that is called Decimal, but I do not have it as a selection in VBA, only in the Tables...
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
How can I dim a variable to become an decimal datatype. I need as many decimal points as I can because of a precise calculation.
I have this now and as you can see I used Double as it appears to give the longest decimal place.
Function giveperc(CalcType As Integer, Template As Long, Cat As Long, Score As Double) As Double
But... it is not long enough.. I did a Manual calculation after and it gives close values but not close enough I had on the end variations up to 5%, and it can only have to do with the fact that it is rounding the numbers.
The function above returns a Value that get's used in a create table Query, and I tried to look what type it creates the field as, and it creates it as a Number/Double.
How do I get more decimals? I know there is a 14Byte datatype that is called Decimal, but I do not have it as a selection in VBA, only in the Tables...
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.