autofill input mask help!

M

MOSE1

I had replied to a previous post and haven't had any new answers. Can anyone
help? Here is the previous post.
It is working now. I changed my data type to "Long Integer" and edited the
public statement to "as Long". However, I need my box numbers to have a 0
in the front. example "083838". The input mask I had made automatically put
the 0 in. Now it no longer does that. Is there anyway to do this and keep
the zero in the front? I greatly appreciate your help.
 
J

John Vinson

I had replied to a previous post and haven't had any new answers. Can anyone
help? Here is the previous post.
It is working now. I changed my data type to "Long Integer" and edited the
public statement to "as Long". However, I need my box numbers to have a 0
in the front. example "083838". The input mask I had made automatically put
the 0 in. Now it no longer does that. Is there anyway to do this and keep
the zero in the front? I greatly appreciate your help.

Whenever you have a "number" which is used as identifier - an address,
a box number, a Zip code, a phone "number" - you should use a Text
datatype. A Long Integer is stored as binary bits; the numbers 13,
013, and 0000013 are ALL EXACTLY THE SAME NUMBER, and are stored
identically.

If you want to store leading zeros, and won't be doing arithmatic with
this box number, use Text instead of Long Integer as your datatype
(and String as the VBA variable type).

John W. Vinson[MVP]
 
M

MOSE1

How would I right the VB Script to use the Text Data type? I tried to
replace the word "integer" with "text" and it didn't work. Any Suggestions?
Thank you
 
J

John Vinson

How would I right the VB Script to use the Text Data type? I tried to
replace the word "integer" with "text" and it didn't work. Any Suggestions?

Use String (I think) - if that's not working please post the relevant
section of your code.

John W. Vinson[MVP]
 
Top