Public Sub NotepadDelete(oRec As IBBDataObject)

   Dim oConstituent As CRecord

   Set oConstituent = oRec


   Dim oNotepad As IBBNotepad

   'Loop through the collection of notepads

   For Each oNotepad In oConstituent.Notepads

       'The following assumes that there is notepad type of Career in the Database

       If oNotepad.Fields(NOTEPAD_fld_NotepadType) = "Career" Then

           'remove the specific notepad

           oConstituent.Notepads.Remove (oNotepad.Fields(NOTEPAD_fld_Id))

           'save the constituent to save the removal



       End If


   Next oNotepad


   Set oNotepad = Nothing


   Set oConstituent = Nothing


End Sub

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.