A
And
I'm having this problem:
In a form (lets name it Form1) I have some fields:
Field1 with the value 1.000.000
Field2 with the value 0,19 (its a percent field so it displays 19,00%)
Field3 with the value 0.80 and
Field4 with the result of the operation Field1*Field2.
While this form is open another form is loaded. This form as a field with
the following control source:
=Round([Forms]![Form1]![Field4]*[Forms]![Form1]![Field3];2)
the result of this operation should be 1190000*0.8=952000 and since the
field is formatted as Standard with 2 decimal places it should display
952000,00 my problem is that it displays 952.000,01.
This even becomes weirder because I made some tests in visual basic and it
seems the problem is related with the data type. Next I present my tests and
why I say this:
First test:
Dim sgle As Double
sgle = Round(Form_Form1.Field4 * Form_Form1.Field3, 2)
MsgBox Round(sgle, 2)
Result: 952000,01 (Incorrect result)
Second test:
Dim sgle As Single
sgle = Round(Form_Form1.Field4 * Form_Form1.Field3, 2)
MsgBox Round(sgle, 2)
Result: 952000 (Correct result)
Did any one ever face the same problem? If so how did you solve it?
Tks in advance
And
In a form (lets name it Form1) I have some fields:
Field1 with the value 1.000.000
Field2 with the value 0,19 (its a percent field so it displays 19,00%)
Field3 with the value 0.80 and
Field4 with the result of the operation Field1*Field2.
While this form is open another form is loaded. This form as a field with
the following control source:
=Round([Forms]![Form1]![Field4]*[Forms]![Form1]![Field3];2)
the result of this operation should be 1190000*0.8=952000 and since the
field is formatted as Standard with 2 decimal places it should display
952000,00 my problem is that it displays 952.000,01.
This even becomes weirder because I made some tests in visual basic and it
seems the problem is related with the data type. Next I present my tests and
why I say this:
First test:
Dim sgle As Double
sgle = Round(Form_Form1.Field4 * Form_Form1.Field3, 2)
MsgBox Round(sgle, 2)
Result: 952000,01 (Incorrect result)
Second test:
Dim sgle As Single
sgle = Round(Form_Form1.Field4 * Form_Form1.Field3, 2)
MsgBox Round(sgle, 2)
Result: 952000 (Correct result)
Did any one ever face the same problem? If so how did you solve it?
Tks in advance
And