InfoString property
This example function checks if the Gross Value (InvoiceTotalVatIncludedAmount) of an invoice is greater than 100. If it is, a validation error occurs and the value of the InfoString property is displayed in the Info box.
Public Function OnFieldValidate() As Long
Dim RetVal As EHICOM.EIReturnValue
RetVal = evtOK
Dim objField As InvoiceField
Set objField = m_EHApplication.CurrentField
If Not objField Is Nothing Then
If objField.FieldTypeName = "InvoiceTotalVatIncludedAmount" Then
Dim lCurrentValue As Double
Dim lUserDefValue As Long
lCurrentValue = Val(objField.Value)
If lCurrentValue > 100 Then
'// The current field value is too big, therefore set the status to Validation Error.
'// OKAbort is returned to ensure no other validation is made on the field.
objField.Status = eiFieldValidationError
objField.InfoString = "The amount must be no more than 100 pounds."
RetVal = evtOKAbort
End If
End If
End If
OnFieldValidate = RetVal
End Function
The result looks like this:

Related topic