Private Sub MemConstitTest()

    Dim isloaded As Boolean
    isloaded = False
    Dim membership As New CMembership
    membership.Init REApplication.SessionContext
   
    Dim membershipID As Long
    Dim oRec As CRecord
    Set oRec = New CRecord
   
    'Membership ID (front end) is 1234 and the system ID is 116
    membershipID = "1234"
   
    ''Deceased Record ID is 765
    ''Current Record ID is 766
   
    'membership.Load 116
    membership.LoadByField uf_MEMBERSHIP_MEMBERSHIPID, membershipID
            If Not membership Is Nothing Then
                oRec.Init REApplication.SessionContext
                Debug.Print "Constit ID: " & membership.Fields(MEMBERSHIP_fld_Constit_ID)
                'This should equal 766
                oRec.Load membership.Fields(MEMBERSHIP_fld_Constit_ID)
                isloaded = True
            End If
       
        Debug.Print isloaded
       
    oRec.Closedown
    Set oRec = Nothing
   
    membership.Closedown
    Set membership = Nothing

End Sub 



Blackbaud provides 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 that you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures.  Blackbaud Customer Support can help explain the functionality of a particular procedure but they will not modify, or assist you with modifying, these examples to provide additional functionality.  If you are interested in learning more about VBA and API modules, contact our Sales department at solutions@blackbaud.com.