View Single Post
  #4  
Old May 11th, 2010, 06:45 PM posted to microsoft.public.access.gettingstarted
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Numeric or Alpha

You could format the number to show 10 digits, with leading zeros, but I'd
agree with the others that a text data type is almost certainly more
appropriate here. A number is really a value with ordinal or cardinal
significance, or a measure of quantity, whether arithmetic operations on it
are required or not. In your case the fact that you require leading zeros
and the very scale of the 'number' pretty well rules that out.

Values made up of numeric digits are often encoding systems rather than
numbers; phone numbers, credit card numbers, ISBN numbers and ZIP codes are
examples. For these a text data type is appropriate as they have no ordinal,
cardinal or quantitative significance.

Ken Sheridan
Stafford, England

Box666 wrote:
I am just starting to build a table, i have a RefNo which must always
be 10 numbers long, so I have set the field as numeric.

Some of these RefNo's begin with a "0" or even "00", after i have put
them in the first 0's dissapear. The field is set as numer does this
mean i will have to set the field as text so that the first 0's appear
and hold in place.? or is there something i can do to force the 0 to
stay in place and still keep the field numeric.

I also need to ensure that there are always 10 digits in the RefNo
field, with any missing numbers being shown as 0 at the start of the
number.(sorry i may have asked the same question twice.)

The RefNo field will become very important latter as i had wanted to
use it as the primary key, and it will be used in a lot of search
querys


--
Message posted via http://www.accessmonster.com