Combo Box

  • Thread starter Thread starter Shawn
  • Start date Start date
S

Shawn

Each selection is rounded to the nearest whole number.
Does anyone know how to turn that off?
 
The format of a displayed number is controlled by the
Format and Decimal Properties, however, this error is
often caused by the Row Source of the combo box being a
Single or Double precision real number, while the
underlying field into which you're trying to store the
value is an Integer.


HTH
Kevin Sprinkel
 
I have been confused by the designation of "double." I was trying to display figures in a form using "decimal" formatting. That did not work. I was advised to use "decimal, standard or fixed." It worked. When would you use "decimal" formatting and why the designation of "double?" Thanks

Robert
 
I have been confused by the designation of "double." I was trying to display figures in a form using "decimal" formatting. That did not work. I was advised to use "decimal, standard or fixed." It worked. When would you use "decimal" formatting and why the designation of "double?" Thanks.

Microsoft does a good job of making this a confusing issue!

Don't confuse the *FORMATTING* of data - a translation process which
affects how the data is *displayed* - with the *STORAGE* of data. They
are distinct (though interdependent) properties of a field.

You can store numeric data in several different types of field: they
have different sizes, different limitations. They are:

-Number datatypes-

Integer - whole numbers between -16386 and +16385
Long Integer - whole numbers bewteen -2147483648 and 2147483647
Single - "floating point" numbers, allowing fractional values; stored
in a 32 bit word size, allow about 7 decimal places precision and a
range up to 10^37
Double - a bigger Floating Point number, with about 14 decimal places
and a range up to 10^308

-Decimal datatype-

A new (and by all accounts somewhat buggy) datatype for Access, long
used in SQL/Server; you specify the number of decimal places and the
size. E.g. a Decimal(5,2) field lets you store up to five digits, with
two of them to the right of the decimal place.

-Currency datatype-

A scaled huge integer with exactly four decimal places and a range
into the trillions.

You can set the Format property of any of these datatypes, even
setting it to something that won't work - for instance, you can
specify a Format of #,##0.000 for an Integer field, and it will
display 3344 as 3,344.000; but it will NOT let you enter 3,344.521
because an Integer field accepts only whole numbers.

As a rule, if you've got a fixed number of decimal places less than
four, use Currency; if you need only whole numbers use Integer or Long
Integer; if you're using a "number" such as a phone number or Social
Security number, which is really an identifier rather than a value for
calculations, use a Text datatype.
 
-----Original Message-----
I have been confused by the designation of "double." I
was trying to display figures in a form using "decimal"
formatting. That did not work. I was advised to
use "decimal, standard or fixed." It worked. When would
you use "decimal" formatting and why the designation
of "double?" Thanks.

Double is not a "formatting", but refers to the amount of
memory allocated to a numeric field. A Single uses 4
bytes, a Double 8. From FieldSize property Help,

A Single Stores numbers from
-3.402823E38 to -1.401298E-45
for negative values and from
1.401298E-45 to 3.402823E38 for positive values.

A Double Stores numbers from
-1.79769313486231E308 to
-4.94065645841247E-324
for negative values and from
4.94065645841247E-324 to
1.79769313486231E308 for positive values

Even a Single is quite precise for most work, but when
round off errors for complex calculations must be
minimized, or for some other added precision is required,
a Double is available.

HTH
Kevin Sprinkel
 
Back
Top