Significant figures after a decimal point

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

Guest

I am new to Access, using Access2002. I have a field set up as follow
Data type: Numbe
Field Size: Decima
Format: General numbe
Precision: 1
Scale:
Decimal places:

The field is to hold lengths; these can have a variable number of digits after the decimal point. My problem is that any zeros at the end of the number are truncated. The difference between 3.45, 3.450 and 3.4500 is important due to the precision implied. THe numerical values are important so I cannot change the type to text. How can I stop the zeros being deleted

thanks

Alice
 
The difference between 3.45, 3.450 and 3.4500 is important due to the precision implied.

Too bad... because the trailing or leading zeros are not stored in a
decimal number. As far as Access (and the binary bits of which a
Decimal number field is composed) is concerned, these are three ways
of depicting exactly the same value.

You'll need to use Text and the Val() function to convert the text
string to a number for calculations - and, of course, all three will
convert to exactly the same value.
 
You'll need to use Text and the Val() function to convert the text
string to a number for calculations - and, of course, all three will
convert to exactly the same value.

But at least you'll be able to retrieve the string values too, count the
decimal places in each, work out from those how precise the result of
the calculation should be considered to be, and finally use this to
store the result as a string with the right number of trailing zeroes.
 
I use Access 97 and have come across this annoying little "feature".

What I have done (and remember A97) is set the format to 00000.0000000 or
whatever permutation you like and hey presto it will appaear with leading
and trailing zero's

If you don't want leading zero's use #.000000 it's essentailly the same as
Excel.

Whether it works in A2002........?

Evan



Alice Dawson said:
I am new to Access, using Access2002. I have a field set up as follows
Data type: Number
Field Size: Decimal
Format: General number
Precision: 18
Scale: 6
Decimal places: 6

The field is to hold lengths; these can have a variable number of digits
after the decimal point. My problem is that any zeros at the end of the
number are truncated. The difference between 3.45, 3.450 and 3.4500 is
important due to the precision implied. THe numerical values are important
so I cannot change the type to text. How can I stop the zeros being
deleted?
 
Back
Top