Sub CtlLenghtError_eng(frm As Form, strWork As String)
Dim ctl As Control
For Each ctl In frm.Controls
Select Case ctl.ControlType
Case acTextBox
If ctl.ControlTipText = strWork Then
MsgBox "Data field - " & ctl.ControlTipText & " - " & Chr(13) & _
"has more characters than it's need." & Chr(13) & _
"Please edit it and try again.", vbCritical, "Process is terminated!"
ctl.SetFocus
Exit Sub
End If
End Select
Next ctl
End Sub
|