The following code should be placed in the System_Macros module in VBA and called from the macro menu on a constituent record

Public Sub GetConstitID(oRec As IBBDataObject)

   If TypeOf oRec Is CRecord Then

       Dim oConstit As CRecord

       Set oConstit = oRec


       MsgBox oConstit.Fields(RECORDS_fld_CONSTITUENT_ID)


       Set oConstit = Nothing


       MsgBox "This macro must be fired from a constituent record"

   End If

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.