Leading Zero's fall off

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Hi
Why do Leading 0's fall off? Access 2K

I have a table with the field as text ie; acctnumber
I am trying to place the number of the account
into this field as default value but the leading zeros do NOT
stay. Acct number is 0123456 and once I move from the
default value line it changes to 123456... 0's gone.

Please explain why this is happening?

TIA
Donny
 
Probably a feature of the Access GUI. The safest way is to
enclose your default in "" when it is a number e.g.
"0123456"

Hope This Helps
Gerald Stanley MCSD
 
Hi
Why do Leading 0's fall off? Access 2K

I have a table with the field as text ie; acctnumber
I am trying to place the number of the account
into this field as default value but the leading zeros do NOT
stay. Acct number is 0123456 and once I move from the
default value line it changes to 123456... 0's gone.

Please explain why this is happening?

What is the data type of the field? I'd suggest using Text - it sounds
like you are using a Number datatype. A Number is stored as binary
bits, and the *numbers* 123456 and 0123456 and 00000123456 are all the
same number, just displayed differently.
 
Back
Top