Help me block out the first 5-digits of the SSN

lebelerc

New member
Local time
Today, 22:11
Joined
May 15, 2003
Messages
8
I hope someone can help me. I have a report that prints out with the customers social security number on it. I need to change it so that only the last four digits of the SSN show, so it would like something like this XXX-XX-1234. I still want it to keep the full SSN in my Table though so we can search for the customers info with the SSN.

Is there a way that I can change it on the report only and not mess up any other forms that I have it on? Any help would be awesome!
 
Base your report on a query.
In the query, use the Right function to extract the last four digits.
Concatenate with the number of X's you require:

'XX-XXXX-' & Right(SSN,4)

Could be you'll have to replace the comma by a semi colon.

RV
 
In your report put an unbound text Box and put this as the control source.
Code:
=Right([txtSSN],4)
(Assuming that txtSSN is the name of your control)
 
Sorry I made a mistake, it should read:

Code:
="XXX-XX-"&Right([txtSSN],4)
 

Users who are viewing this thread

Back
Top Bottom