ErrorDescription

This property sets or returns an error description.

Syntax

ErrorDescription as String

Sample Code

Private Sub Document_Validate(pWorkdoc as SCBCdrWorkdoc, pValid as Boolean)
   Dim Number as string
   Dim Name as string
   'get fields name and number and make a database lookup
   Number = pWorkdoc.Fields("Number")
   Name = pWorkdoc.Fields("Name")
   if LookupDBEntry(Name, Number) = FALSE then
      'the Name/Number pair is NOT in the database set the document state to invalid
      pValid = FALSE
      'make both fields invalid and provide an error description
      pWorkdoc.Fields("Number").Valid = FALSE
      pWorkdoc.Fields("Number").ErrorDescription = "Not in database"
      pWorkdoc.Fields("Name").Valid = FALSE
      pWorkdoc.Fields("Name").ErrorDescription = "Not in database"
   end if
End Sub