rounding values in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created 2 fields, (Time On Site) and (Customer Charge). I have the
customer charge field setup to calculate the charges based on the value I put
into the (Time On Site) field, ie; 1.25, or 1.75 etc. For some reason, Access
automatically rounds the number down to a whole number (1.00) and gives me an
inaccurate result in the (Customer Charge) field. The (Time On Site) field is
set to long integer, fixed format, and 2 decimal places. The (Customer
Charge) field is a calculated field =[time on site]*50
I can't seem to get the (Time On Site) field allow me to input the correct
values without automatically rounding down.
 
Change that Time On Site field to be formatted as a Single or Double numeric
type, and not as a Long Integer or Integer type.
 
Thanks Ken, that worked. Now that I solved that problem, why doesn't the
calculated result appear in my table for the Customer Charge field? This is
the field I will be using on my reports to give me a monthly total.

Ken Snell said:
Change that Time On Site field to be formatted as a Single or Double numeric
type, and not as a Long Integer or Integer type.

--

Ken Snell
<MS ACCESS MVP>

IntruderGT said:
I have created 2 fields, (Time On Site) and (Customer Charge). I have the
customer charge field setup to calculate the charges based on the value I put
into the (Time On Site) field, ie; 1.25, or 1.75 etc. For some reason, Access
automatically rounds the number down to a whole number (1.00) and gives me an
inaccurate result in the (Customer Charge) field. The (Time On Site) field is
set to long integer, fixed format, and 2 decimal places. The (Customer
Charge) field is a calculated field =[time on site]*50
I can't seem to get the (Time On Site) field allow me to input the correct
values without automatically rounding down.
 
IntruderGT said:
Thanks Ken, that worked. Now that I solved that problem, why doesn't the
calculated result appear in my table for the Customer Charge field? This is
the field I will be using on my reports to give me a monthly total.

A control is ether bound to a field in the table OR contains an expression. It
cannot do both, but nor is it necessary as any value that can be calculated does
not need to be stored in the table. Just put that expression as a calculated
file in a query and use the query any place you would use the table.
 
Calculated fields are not stored and never should be. If you need the value
to appear on a report you create the calculation in a query and use the
query against the report.

IntruderGT said:
Thanks Ken, that worked. Now that I solved that problem, why doesn't the
calculated result appear in my table for the Customer Charge field? This
is
the field I will be using on my reports to give me a monthly total.

Ken Snell said:
Change that Time On Site field to be formatted as a Single or Double
numeric
type, and not as a Long Integer or Integer type.

--

Ken Snell
<MS ACCESS MVP>

IntruderGT said:
I have created 2 fields, (Time On Site) and (Customer Charge). I have
the
customer charge field setup to calculate the charges based on the value
I put
into the (Time On Site) field, ie; 1.25, or 1.75 etc. For some reason, Access
automatically rounds the number down to a whole number (1.00) and gives
me an
inaccurate result in the (Customer Charge) field. The (Time On Site)
field is
set to long integer, fixed format, and 2 decimal places. The (Customer
Charge) field is a calculated field =[time on site]*50
I can't seem to get the (Time On Site) field allow me to input the
correct
values without automatically rounding down.
 
Back
Top