I have the following code that is not working
If strLastName is a length of 3 I want to pad 1 space between the 3 characters and the strSSN in strVendorNum
If strLastName is a length of 2 I want to pad 2 spaces between the 2 characters and the strSSN in strVendorNum
Thanks, John
If Len(Me.strLastName = 4) Then Me.strVendorNum = UCase(Left(Me.strLastName.Text, 4)) _ & Left(Me.strSSN, 3) & "-" & MID(Me.strSSN, 5, 2) & "-" & Right(Me.strSSN, 4) Else If Len(Me.strLastName = 3) Then Me.strVendorNum = UCase(Left$(Me.strLastName.Text, 4)) & " " _ & Left(Me.strSSN, 3) & "-" & MID(Me.strSSN, 5, 2) & "-" & Right(Me.strSSN, 4) Else If Len(Me.strLastName = 2) Then Me.strVendorNum = UCase(Left$(Me.strLastName.Text, 4)) & " " _ & Left(Me.strSSN, 3) & "-" & MID(Me.strSSN, 5, 2) & "-" & Right(Me.strSSN, 4) Else If Len(Me.strLastName = 1) Then Me.strVendorNum = UCase(Left$(Me.strLastName.Text, 4)) & " " _ & Left(Me.strSSN, 3) & "-" & MID(Me.strSSN, 5, 2) & "-" & Right(Me.strSSN, 4) End If End If End If End If