Form Rounds up Decimal numbers, WHY?

  • Thread starter injanib via AccessMonster.com
  • Start date
I

injanib via AccessMonster.com

I have two number fields. In the table I have the fields set up as decimal
and the format is general number with two decimal places. I have the same
format for the fields in the form, but everytime I try to put in a decimal
number the form automaticaly rounds it up to the nearest whole numer. Any
idea why??
 
J

Jeff Boyce

When I see that kind of behavior, I look for formatting as an Integer or
Long Integer.

If you don't find it in the underlying table or in the form, and you don't
have code running behind the form that might do that, consider re-creating
the form. Sometimes an Access form can get subtly corrupted and (I've
found) it's easier to start over.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I

injanib via AccessMonster.com

I have tried all possible formats, and recreating the form at this point
happens to be extremely inconvinient and time consuming. It has way to much
stuff on it.

thanks for the suggestion though.
 
J

John W. Vinson

I have tried all possible formats, and recreating the form at this point
happens to be extremely inconvinient and time consuming. It has way to much
stuff on it.

Just to clarify - the problem is probably not the Format of the number, but
the Datatype. The default Number datatype in a table is long Integer - and
integers are, by definition, whole numbers. Check the table definition!

You should not need to recreate the form if you change the datatype of the
underlying field.

John W. Vinson [MVP]
 
B

Bob Quintal

"In the table I have the fields set up as decimal and the
format is general number with two decimal places" would
indicate that you have the datatype set as *decimal.* Unless
this datatype has been added since AC2000 (it doesn't exist in
2000), John has to be correct!

Decimal exists in Access 2002, but it stores only integers. One
must set the Scale property to the correct number of decimal
places, the decimal places property is useless.
 
M

missinglinq via AccessMonster.com

"In the table I have the fields set up as decimal and the format is general
number with two decimal places" would indicate that you have the datatype set
as *decimal.* Unless this datatype has been added since AC2000 (it doesn't
exist in 2000), John has to be correct!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
R

RoyVidar

missinglinq via AccessMonster.com said:
Unless this datatype has been added
since AC2000 (it doesn't exist in 2000), John has to be correct!

Hm, are you sure?

Data Type: Numeric
Field Size: Decimal
 
D

David Coryell

To store a number like 1.7 and stop Access from rounding it to 2 set: Field Size - Decimal, Format - Fixed, Presision - ("Number you will store each side of the decimal. I needed 6."), Scale - ("Number of digits you will store to the right of the decimal. I needed 1."), Decimal Places - ("Number of digits displayed. I needed 1."). I know these kinds of things drive you crazy. Me too. Hack it up and take a break sometime. Dave





injanib via AccessMonster.com wrote:

Form Rounds up Decimal numbers, WHY?
13-Jul-07

I have two number fields. In the table I have the fields set up as decima
and the format is general number with two decimal places. I have the sam
format for the fields in the form, but everytime I

Previous Posts In This Thread:

Form Rounds up Decimal numbers, WHY?
I have two number fields. In the table I have the fields set up as decima
and the format is general number with two decimal places. I have the sam
format for the fields in the form, but everytime I

When I see that kind of behavior, I look for formatting as an Integer or Long
When I see that kind of behavior, I look for formatting as an Integer o
Long Integer

If you do not find it in the underlying table or in the form, and you do no
have code running behind the form t

I have tried all possible formats, and recreating the form at this
I have tried all possible formats, and recreating the form at this poin
happens to be extremely inconvinient and time consuming. It has way to muc
stuff on it

thanks for the suggestion though

Je

Re: Form Rounds up Decimal numbers, WHY?
wrote

Just to clarify - the problem is probably not the Format of the number, bu
the Datatype. The default Number datatype in a table is long Integer - an
integers are, by definition, whole numbe

"missinglinq via AccessMonster.

Decimal exists in Access 2002, but it stores only integers. On
must set the Scale property to the correct number of decima
places, the dec

"In the table I have the fields set up as decimal and the format is
"In the table I have the fields set up as decimal and the format is genera
number with two decimal places" would indicate that you have the datatype se
as *decimal.* Unless this datatype has been ad

"missinglinq via AccessMonster.
<7523f574c2736@uwe>

Hm, are you sure

Data Type: Numeri
Field Size: Decima

-
Roy-Vidar

EggHeadCafe - Software Developer Portal of Choice
Document Compatibility in Internet Explorer 8
http://www.eggheadcafe.com/tutorial...b-a7cd299b73c9/document-compatibility-in.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top