Access. Setting Decimal Places

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

Guest

I'm doing a basic Access module at college. I have to create tables and
queries with decimal places.

When I get home and try to set them up on my own computer, I think I've done
it (using the information in Office Assistant), by selecting the field,
clicking on the General tab, clicking Decimal Places and then setting the
number.

When I return to Table View, as soon as I try to enter another number with a
decimal point the previous entry changes back to a whole number.

This does not occur on the computers at college.

How can I prevent this from occurring on my home computer?

How do I set up Access so this does not occur?
 
I'm doing a basic Access module at college. I have to create tables and
queries with decimal places.

When I get home and try to set them up on my own computer, I think I've done
it (using the information in Office Assistant), by selecting the field,
clicking on the General tab, clicking Decimal Places and then setting the
number.

When I return to Table View, as soon as I try to enter another number with a
decimal point the previous entry changes back to a whole number.

This does not occur on the computers at college.

How can I prevent this from occurring on my home computer?

How do I set up Access so this does not occur?

The Field is a Number datatype.
In all probability it's Field Size property is Integer or Long
Integer.
By definition, an Integer is a whole number, and cannot have a decimal
value.
Either change the field size property to Double, or Single.....
Or change the Field's Datatype to Currency.
Set the Format to Standard or Fixed.
Decimal Places can be set to Auto or 2.
 
This does not occur on the computers at college.

How can I prevent this from occurring on my home computer?

I'm guessing that on the college computer you're using a Decimal
datatype, or perhaps Double or Single or Currency - datatypes which
can support decimal places. The default Number datatype is Long
Integer, which (as the name implies) handles only whole numbers.

If you want up to four decimal places, proper sorting, and no roundoff
error, use Currency as a datatype (instead of any kind of Number). The
newly-added Decimal datatype is reportedly buggy and does not always
sort or search correctly; use it if you wish, but be cautious and
check your results! If you need more than four decimals, use Double
but be aware that (like all floating point numbers in all software)
Double numbers are *approximations*, with an accuracy of plus or minus
one in the fourteenth decimal place; sounds pretty good but if you
compare 0.3 with 0.1 + 0.1 + 0.1 they will NOT be equal.

John W. Vinson[MVP]
 
Back
Top