Link to home
Start Free TrialLog in
Avatar of FatCat1973
FatCat1973

asked on

Hide part of a field- Social Security Number to show only last four digits-

I need to be able to convert a field that currently stores ssn- I need it to act like a password field where only the last four digits show and the rest are ***** on display.  I was unable to do it with an input mask. This is a two part question 1. HOw do I convert existing data and will this remedy work for future inputs?

The ssn field is a text and has no placemarkers.

Thanks,
Melissa Farmer

Avatar of Jim Horn
Jim Horn
Flag of United States of America image

I don't believe you will be able to pull this off in the table definition.

You can, however, create a query off of that table, where the last four are displayed as Last4: Right(SSN, 4)

Hope this helps.
-Jim
If the input mask didn't work for you, you'll have to set up the mask yourself.  Jim's got the right idea for the data part.  For the display, create a label in front of your SSN text box like this:


| xxx-xx- |   0000  |
  label           field info
Avatar of FatCat1973
FatCat1973

ASKER

Is there no way to edit the password input mask to work for this. I like that is stores the actual number but to view it is only an *

Melissa
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can input mask the whole entry
If this is for viewing on a form, you can use a variation on Jim's method:

Dim myValue as String
myValue = Dlookup("yourfield", "yourtable", "RecID =" & chr(34) & Me.RecIDtextbox & chr(34))

myValue = Left(myValue,10) & "******"
Me.Textbox = myValue


Idea?
Thanks so much- Sometimes my visions are better than what is able to be done- but that works for me in a query.

Thanks,
Melissa :)
Good luck with your hiding of sensitive informaiton.  Now you just have to worry about keeping the tables with SSN's secure.  

-Jim
Danny I was trying to convert the data at the table level- I have to send out copies of our database to another government agency and we wanted to hide those first five digits in the table :(
>hide those first five digits in the table :(
Why not just run an UPDATE query to remove the first five digits?  Tables are only intended to hold data, not to be a user interface, so if the end user of the table should not see the first five digits, just delete them.  Just my .02.
That is excatly what I am going to do- thanks :)
>>That is excatly what I am going to do
Hence teh accepted answer, Jim

:-p
I had someone come to me with the same problem using Access 2007.  They are storing the full social security number in their table but only want someone else using an input form to see part of it for identification purposes or print out a report with only the last four showing.  Here is what I came up with (attached).
Access-2007-SSShow4Only-HowTo-LA.pdf