This has probably been asked a thousand times, but even with all my searches I still cannot find the correct answer for my situation. I need to mask a SSN field and display only the last 4 digits so it would display like "XXX-XX-1234"
I figured out that I can just set the control source to ="XXX-XX-" & right([SSN], 4) or something similar, but I am using the same form for data entry (new records) as well as viewing existing ones. If I am entering a new record I cannot enter the SSN in that field because it would be an unbound calcualted field.
So to sum up, what I need is when I am entering a new record in my form I need to SSN field to be able to accept input WITHOUT masking (to verify correct entry), but after the record is saved and reopened, that SSN field is now displaying "XXX-XX-1234"
I have thoughts on how to start it, but maybe someone can fill in the blanks for me...
My thought are... (rough draft)
Any thoughts???
I figured out that I can just set the control source to ="XXX-XX-" & right([SSN], 4) or something similar, but I am using the same form for data entry (new records) as well as viewing existing ones. If I am entering a new record I cannot enter the SSN in that field because it would be an unbound calcualted field.
So to sum up, what I need is when I am entering a new record in my form I need to SSN field to be able to accept input WITHOUT masking (to verify correct entry), but after the record is saved and reopened, that SSN field is now displaying "XXX-XX-1234"
I have thoughts on how to start it, but maybe someone can fill in the blanks for me...
My thought are... (rough draft)
Code:
OnCurrent
if me.newrecord then
whatever code to show all digits but also keeping an input mask of the "999-99-9999" format
Else
whatever code that will "x" out the first 5 digits
End If
Any thoughts???