Leading Zero's fall off

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
 
G

Gerald Stanley

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
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top