Function FldValCount(fld As NotesItem) As Long ' calculates the number/elements of list values contained in a field On Error Goto FErrorHandler ' set to no elements FldValCount = 0 ' check fld exists If (fld Is Nothing) Then Exit Function End If ' build number of elements Forall curval In fld.Values FldValCount = FldValCount + 1 End Forall FExit: Exit Function FErrorHandler: ' return "" FldValCount=0 Resume FExit End Function