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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden Beginning Zero for Social Security# in Table 1

Status
Not open for further replies.

kmkland

Technical User
Dec 15, 2004
114
US
I have formatted my table to include all 9-digits of a social security #, however, the beginning zeros for some social security #s are not included. How do I format my table to show these hidden zeros??
Regards,
Kim
 
If the SSN field is defined as text:
UPDATE yourTable SET [ssn field]=Format(Val([ssn field]), "000000000")
WHERE Len(Trim([ssn field] & "")) Between 1 And 8

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PH,
I attempted this update, but it gave a message stating that it was only updating 1 row... hmm.
Code:
UPDATE [emp list test] SET [emp list test].[SS#] = Format(Val([SS#]),"000000000")
WHERE (((Len(Trim([SS#] & " "))) Between 1 And 8));
I did this correct though, yea?
Regards,
Kim
 
Replace this:
Len(Trim([SS#] & " "
By this (as I posted):
Len(Trim([SS#] & ""

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PH,Thanks so much!! It worked!!!!
Kindest Regards,
Kim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top