Question Stopping Access dropping the leading 0 (Zero)?

NewShoes

Registered User.
Local time
Today, 12:54
Joined
Aug 1, 2009
Messages
223
Hi all,

I'm sure this is an easy question but I cant seem to figure it out. I have to input some numbers into access but all start with a 0. How can I stop access from dropping this leading 0?

Thanks,
-NS
 
You would have to change the data type of the field to text. No numeric data type will hold a leading zero (though you could format it to display them in forms and reports).
 
Thanks for your reply pbaldy. Is there no way I could use an input mask to automatically add the zero at the beginning?

Thanks,
-NS
 
Hi -

'Real' numbers don't have leading zeroes. What is it you're attempting to do?

Bob
 
As I said, a numeric data type will NOT hold the leading zero in the table. You can use the Format function to display

123

as

0123

with Format(FieldName, "0000")
 
As I said, a numeric data type will NOT hold the leading zero in the table. You can use the Format function to display

123

as

0123

with Format(FieldName, "0000")

Where do i enter this command?
 
Do it in the Table Design.

You will see Format.

Use 0000

Press F1 while on that field for more info.
 
a number is a number. leading zeroes are not significant.

so 12345, and 012345, and 0012345 are all the same.

if the leading zero has meaning (eg in a phone number) - then it is not really a number, despite appearances. it is text.
 
Dave

If the OP needs a sequential number then he would need to use Number.

e.g. Client number 000001, 000002, 000003 etc

Then you may wish to add a prefix for the name Jones.
JON000001, JON000002, JON000003 etc.
 

Users who are viewing this thread

Back
Top Bottom