T
Tony Vrolyk
In a Group By query, a number field that contains values that are only one
decimal place is returning a value with 13 decimal places when Summed.
I have a DB that is used to track employee time. The time they enter is
entered as tenths of an hour .1 = 6 min, .2 = 12 min and so on. I use the
format function on the form where time is entered to force the time amount
to be only a single digit past the decimal.
i.e. Me.Hours = format(somenumber, "0.0")
After that the record is saved, referencing the value of the Me.Hours
control which is entered into the field that I am trying to Sum.
In the query I display only the username and hours fields. I Group By
Username and Sum Hours and it returns a value for Sum(Hours) that is 13
decimal places
I have reviewed the data a number of ways to try to find a record that is
more than one decimal place but I can't find any. I changed the formatting
on the field in the table to be 15 decimal places and they all show as a
single decimal. I ran greater then/less then queries, I exported to Excel to
analyze the number and still find not records more then 1 decimal
So assuming the data is all single decimal places why is the query doing
this? Even using one of these...
Sum(Format([Hours],"00.00"))
Sum(Format([Hours],"Fixed"))
....still returns 13 decimal places. That in turn shows up on in the list box
that uses this query as its source.
Thanks for your help
Tony
decimal place is returning a value with 13 decimal places when Summed.
I have a DB that is used to track employee time. The time they enter is
entered as tenths of an hour .1 = 6 min, .2 = 12 min and so on. I use the
format function on the form where time is entered to force the time amount
to be only a single digit past the decimal.
i.e. Me.Hours = format(somenumber, "0.0")
After that the record is saved, referencing the value of the Me.Hours
control which is entered into the field that I am trying to Sum.
In the query I display only the username and hours fields. I Group By
Username and Sum Hours and it returns a value for Sum(Hours) that is 13
decimal places
I have reviewed the data a number of ways to try to find a record that is
more than one decimal place but I can't find any. I changed the formatting
on the field in the table to be 15 decimal places and they all show as a
single decimal. I ran greater then/less then queries, I exported to Excel to
analyze the number and still find not records more then 1 decimal
So assuming the data is all single decimal places why is the query doing
this? Even using one of these...
Sum(Format([Hours],"00.00"))
Sum(Format([Hours],"Fixed"))
....still returns 13 decimal places. That in turn shows up on in the list box
that uses this query as its source.
Thanks for your help
Tony