Allowing "0" as first digit in numerical...

S

Studsy

Im having problems,i know Access 2000 does NOT allow you
to use the number "0" as the first digit in "numerical"
data type.I currently use text,which does do the job,but
it does allow non-numerical data used.
Does anyone know any formating to make this work?

Any ideas will be greatly helpful,
Liam Studham
 
B

Bas Cost Budde

Studsy said:
Im having problems,i know Access 2000 does NOT allow you
to use the number "0" as the first digit in "numerical"
data type.I currently use text,which does do the job,but
it does allow non-numerical data used.
Does anyone know any formating to make this work?

Any ideas will be greatly helpful,
Liam Studham
Unless you need to perform math on the data, stick with text datatype.
If 012 really is different for your application than 12, that is the way
to go.
 
J

Joe Fallon

You cannot *store* a number with a leading 0.
However, you can *display* it by using queries and the Format function.
I guess a lot of it depends on what you are trying to do.

I would stick with text as it is simpler.
 
J

John Vinson

Im having problems,i know Access 2000 does NOT allow you
to use the number "0" as the first digit in "numerical"
data type.I currently use text,which does do the job,but
it does allow non-numerical data used.
Does anyone know any formating to make this work?

Any ideas will be greatly helpful,
Liam Studham

Two solutions:

- Use an Input Mask of 000000 on the Text field to ensure that the
field consists of six numeric digits, forbidding entry of blanks,
alphas, or anything else.

- Use a Long Integer and set the Format property to 000000. This will
not *store* leading zeros - a Number field is stored as binary bits,
not as base-ten digits - but it will display them that way.

I'd recommend the former solution if you're not going to be doing math
on the field.
 

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