Leading zeroes being stripped out of table entries?

P

Pat Dools

Hello, I have a lookup table contains two fields: one for 'labsite number'
and another for 'labsite name'. The 'labsite numbers' all start w/ 2 zeroes
(e.g., '001', '002', etc.). I have 'labsite numbers' defined in my table as
a Number- Long Integer, w/ an Input Mask of '999'. When I enter in '001',
and tab over to the next field, then Access changes it to '1'.

I need the leading zeroes to stay, but Access is not letting them. How do I
do this?

Thx,
 
J

John Vinson

Hello, I have a lookup table contains two fields: one for 'labsite number'
and another for 'labsite name'. The 'labsite numbers' all start w/ 2 zeroes
(e.g., '001', '002', etc.). I have 'labsite numbers' defined in my table as
a Number- Long Integer, w/ an Input Mask of '999'. When I enter in '001',
and tab over to the next field, then Access changes it to '1'.

I need the leading zeroes to stay, but Access is not letting them. How do I
do this?

Use a Text type field.

The number 1 and the number 0000000001 and the number 001 are THE SAME
NUMBER.

The text strings "1" and " 1" and "001" are three different text
strings.

If you won't be adding, subtracting, dividing or multiplying your
Labsite Numbers (which I suspect you won't!) then they aren't really
"numbers" - they are identifiers; and if these identifiers happen to
consist of numeric characters, just use a Text field with an input
mask of

000

to require that only digits can be stored in the text field.

John W. Vinson[MVP]
 

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