Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mask part of SSN
Message
From
19/05/2009 22:03:51
 
 
To
19/05/2009 18:09:41
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01400837
Message ID:
01400853
Views:
108
>Anyone have any ideas on how to display the last 4 digits of the SSN in a textbox and still store the complete number? We have the SSN in the database but management wants to mask it like this:
>
>***-**-1234.

Use a standard text box. Store the true value 123-45-6789 in the Tag property (with or without the dashes). For display set the textbox Value property to the Tag property:

this.Value = "***-**-" + RIGHT(this.Tag,4)

When a user edits the field (has the proper security to edit), then they would enter as normal (this way they can see that they are entering it correctly). Then in the Valid() event, set the Value property to the mask above. You can check the format to verify the correct input and then store to the Tag the true value and replace the Value property with the masked value.
Previous
Reply
Map
View

Click here to load this message in the networking platform