stop the rounding

  • Thread starter Thread starter MonaOH
  • Start date Start date
M

MonaOH

I'm using Access 2007. I have a very small business & am trying to use
access for payroll/hours. When I enter hours with decimal (ie" 7.5), it
automatically rounds to the next number. If I set the property for text, I
cant sum the column. I need to "turn off" the rounding feature by whatever
means & still be able to do mathematical calculations on that column. Can
anyone help??
 
I'm using Access 2007. I have a very small business & am trying to use
access for payroll/hours. When I enter hours with decimal (ie" 7.5), it
automatically rounds to the next number. If I set the property for text, I
cant sum the column. I need to "turn off" the rounding feature by whatever
means & still be able to do mathematical calculations on that column. Can
anyone help??

Most likely the [Hours] field's datatype is Number with the Field Size
property set to Integer or Long Integer.
By definition an Integer is a whole number.... do decimal's allowed.
Change the Field Size property to Single, or Double.
 
Check the number property to make sure you did not use the default datatype
of Integer. Use Single.
 
I'm using Access 2007. I have a very small business & am trying to use
access for payroll/hours. When I enter hours with decimal (ie" 7.5), it
automatically rounds to the next number. If I set the property for text, I
cant sum the column. I need to "turn off" the rounding feature by whatever
means & still be able to do mathematical calculations on that column. Can
anyone help??

I'm guessing that you set the datatype for this field to the default Number
datatype: Long Integer. An integer is, by definition, a whole number.

Open the table in design view and change the field's properties (in the lower
left corner of the screen) from Long Integer to Single, Double, or (probably
best) Decimal with appropriate scale and precision.
 
You've been offered "Single", "Double", and "Decimal" data types to "keep"
your decimal places.

Let me offer one more ... "Currency". Yes, I know the name implies $$, but
it actually provides (up to) 4 decimal places' accuracy, so if you don't
need more than 4, it will do.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Back
Top