Private Sub Text7_Change()
    If Len(Me.Text7.Text & "") > 5 Then
        Me.Text7 = Left(Me.Text7.Text, 5)
        Me.Text7.SelStart = 5
    End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
' "QSTURV" or the letter Z
Select Case KeyAscii
  Case Is = 81, 82, 83, 84, 85, 86, 90, 8
    ' accept input
  Case Else
     KeyAscii = 0
End Select
End Sub