Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

leading zeros in maskedit control 2

Status
Not open for further replies.

ttchimera

Programmer
Jun 13, 2007
12
US
I'm using a maskedit control for social security numbers, but any social security number with leading zeros are missing the zeros. I have the mask set to ###-##-#### and the format is blank. I'm not sure exactly how to make it work.
 
Try:

If Len(MaskedEditBox.Text)<11 Then
MaskedEditBox.Text="0" & MaskedEditBox.Text
End If

I only did this for one leading zero.

I hope this helps.

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top