Hide Social Security Number

Kila

Registered User.
Local time
Today, 08:38
Joined
Mar 5, 2003
Messages
275
I have a database for which I would like to disguise a social security number (123-45-6789) with stars (***-**-****) in my form, but only for a group of people for whom "Employee status" is "Staff". The SSN will not be entered in this particular form, only viewed to double check for all individuals who are not "Staff". Can anyone suggest how to do this? Thanks!
 
Use the forms OnCurrent event to test if their status = staff and then just hide the SSN text box.

Code:
Private Sub Form_Current()

    If [txtEmployeeStatus] = "Staff" Then
        Me.txtSSN.Visible = False
    Else
        Me.txtSSN.Visible = True
    End If

End Sub
 
Thanks!

Thank you. I'll try that.
 

Users who are viewing this thread

Back
Top Bottom