Leading 0's not showing up

P

pokdbz

I have this as an input mask 000\-00\-0000;0;*
the leading 0's are not showing up it shows up like this
Original 007-77-7777
wong 777-77-77

How do I change it so it shows the leading 0's?
 
P

pokdbz

I set it in the properties on a form in the text box. It is not showing up
in the text box.
 
J

Jerry Whittle

Is the field Text or a Number in the table? Even with an input mask, a number
field will not retain leading zeros. One of the reasons that things like
Social Security Numbers and ZipCodes should be stored in Text fields. If you
ain't doing math on it, it ain't a number. For example, I can't think of a
good reason to multiply a SSN by 2.
 
P

pokdbz

Yes the SSN is being stored as Text

Jerry Whittle said:
Is the field Text or a Number in the table? Even with an input mask, a number
field will not retain leading zeros. One of the reasons that things like
Social Security Numbers and ZipCodes should be stored in Text fields. If you
ain't doing math on it, it ain't a number. For example, I can't think of a
good reason to multiply a SSN by 2.
 
D

Dirk Goldgar

pokdbz said:
Yes the SSN is being stored as Text

Are you sure? Please double-check the field definition in the table
design. What you describe sounds like the field type is Number.
 
P

pokdbz

I think I see what the problem is. I have this statement which pulls the SSN
from the previous form:
If Me.OpenArgs <> "" Then Me.SSN.DefaultValue = Me.OpenArgs

The defaultvalue only pulls number which removes the previous 0's.
I tried to take out the .DefaultValue but that just resulted in an error.
Do you have any idea how to correct this so it lets me pull text instead of
a number?
 
P

pokdbz

Found the problem thanks

pokdbz said:
I think I see what the problem is. I have this statement which pulls the SSN
from the previous form:
If Me.OpenArgs <> "" Then Me.SSN.DefaultValue = Me.OpenArgs

The defaultvalue only pulls number which removes the previous 0's.
I tried to take out the .DefaultValue but that just resulted in an error.
Do you have any idea how to correct this so it lets me pull text instead of
a number?
 

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

Similar Threads


Top