I am currently using a program called Speedy Schedule that allows us to book and keep track of patients in the office. Currently, the form requires the patients full SSN, we want it to only require the last 4 digits of the SSN and then be able to provide a list of patients that match those digits when doing a search. I would need to know what the correct syntax for that code might be. Currently our coding is as follows: Private Sub txtSSN_LostFocus() X = Right(txtSSN.Text, 5) v = Left(X, 1) If v "-" Then Dim sTemp As String sTemp = "" sStrIn = txtSSN.Text sStrIn = sStrIn & String$(9, "0") If sStrIn String$(9, "0") Then sStrIn = Left$(sStrIn, 9) sTemp = Left$(sStrIn, 3) & "-" & Mid$(sStrIn, 4, 2) & "-" & Right$(sStrIn, 4) End If txtSSN.Text = sTemp End If End Sub Please Help!!!!!!
Well i tried to do it as readable as possible, but anyway i put it it appears as it is So is there anyone who would know the correct syntax for the code that would only require the last 4 of the SSN
If have the VB editor copy it correctly and post it and try seeing a preview. If it does not work try pasting it in notepad and then again copy and paste here. New Line should be preserved no matter what. Also if the error occurred once it would occur once again no matter how many times you create the thread.