TableValidationErrorDescription

This property sets or returns an ErrorDescription for the table validation.

Syntax

TableValidationErrorDescription as String

Sample Code

Private Sub MyTableField_ValidateTable (pTable as SCBCdrPROJLib.SCBCdrTable, pWorkdoc as SCBCdrPROJLib.SCBCdrWorkdoc, pValid as Boolean)
   'calculate the sum of all amounts and compare with the net amount fields
   Dim tablesum as double, netamount as double
   Dim cellamount as double
   Dim row as long
   For row = 0 to pTabler.RowCount-1
      cellamount = CLng(pTable.CellText("Total Price", Row))
      tablesum = tablesum + cellamount
   Next row
   'now compare sum with the content of the net amount field
   netamount = CDbl(pWorkdoc.Fields("NetAmount").Text
   if netamount = tablesum then
      pValid = TRUE
   else
      pValid = FALSE
      pTable.TableValidationErrorDescription = "Sum of table amounts and field net amount are different"
   end if
End Sub