L
LarsM
Just for your information: Some months ago I asked a question about decimals
in presentation of numerical fields in forms and reports. Now I just happened
to bump into an answer myself, which seems to help me in most cases. A
numerical value (long real, double precision) has maybe 15 decimals. If the
field in the form or report isn't wide enough to show all 15 decimals, it
just shows #####. What I asked about some months ago was a method to show the
value with just as many decimals, as there is room for.
Now it seems, that if I make a calculation in a field of the select query
that the form or report is based on, and I then refer to that field in a form
or report, the field shows #####. If I make the calculation in the form or
report itself instead of making it in the select query, it seems to be
working, as I want it to work. Don't ask me why, but it seems to work! This
will help me in cases, where the value of the field is calculated only when
the form or report is opened.
In cases where the value has been calculated in advance and has been stored
in a numerical field (long real, double precision) in a table, the method
above does not help me. If the value in the table has been updated by an
update query, I have modyfied the update query, so that the update query
itself rounds the value to fewer decimals. As far as I have tested until now
it works, but I am not sure what will happen, if the update query rounds to 2
decimals, and the precision of the computer itself causes a number e.g. 4.18
to be saved as 4.180000000000001 or 4.179999999999999. In that case the value
will probably still be shown as #####.
in presentation of numerical fields in forms and reports. Now I just happened
to bump into an answer myself, which seems to help me in most cases. A
numerical value (long real, double precision) has maybe 15 decimals. If the
field in the form or report isn't wide enough to show all 15 decimals, it
just shows #####. What I asked about some months ago was a method to show the
value with just as many decimals, as there is room for.
Now it seems, that if I make a calculation in a field of the select query
that the form or report is based on, and I then refer to that field in a form
or report, the field shows #####. If I make the calculation in the form or
report itself instead of making it in the select query, it seems to be
working, as I want it to work. Don't ask me why, but it seems to work! This
will help me in cases, where the value of the field is calculated only when
the form or report is opened.
In cases where the value has been calculated in advance and has been stored
in a numerical field (long real, double precision) in a table, the method
above does not help me. If the value in the table has been updated by an
update query, I have modyfied the update query, so that the update query
itself rounds the value to fewer decimals. As far as I have tested until now
it works, but I am not sure what will happen, if the update query rounds to 2
decimals, and the precision of the computer itself causes a number e.g. 4.18
to be saved as 4.180000000000001 or 4.179999999999999. In that case the value
will probably still be shown as #####.