Hiding part of a Social Security Number

M

Maredith

I have a database application that includes some privacy information for
employees. Permissions to view and/or edit are handled in code. The last four
digits of the Social Security number are used along with the first and last
names to confirm a "match" for data coming in from other systems. On the main
data input form for the employees, I want the Social Security number to
appear like:
*****1234 for all users who have permission to view the data, but
567891234 for users who have permission to edit the data when they
click on that field. Or, alternately, change to showing all digits as soon as
they start to edit the record or begin a new record. Any ideas? This is in
single form (not continuous).
 
A

Arvin Meyer [MVP]

What I would do is add a column in the underlying query that is the form's
recordsource:

NoPerm: "*****" & Right([SSN], 4)

Then in your form's open event determine the user permissions and show or
hide the appropriate textbox bound to that data. You want to Lock and/or
Disable that textbox so no one can even try to edit it.

Now, for the lecture. Why are you storing personal information? Is this a
payroll database? If not, you probably should not be storing it, since it is
not likely that you can secure it enough to protect it. Do not store any
personal information that is not absolutely required for your business
process.
 

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

Top