Public Sub MembershipExpirations()
    Dim oConst As CRecord
    Set oConst = New CRecord
    oConst.Init REApplication.SessionContext
    oConst.Load 280
   
    Dim oMem As CMembership
    Dim oTran As CMembershipTransaction
   
    For Each oMem In oConst.Memberships
       
        Debug.Print oMem.Fields(MEMBERSHIP_fld_Description)
       
        For Each oTran In oMem.Transactions
       
            Debug.Print oTran.Fields(MEMBERSHIPTRANSACTION_fld_Program)
            Debug.Print oTran.Fields(MEMBERSHIPTRANSACTION_fld_Expires_On)
       
            Set oTran = Nothing
        Next oTran
       
        oMem.Closedown
        Set oMem = Nothing
    Next oMem
   
    oConst.Closedown
    Set oConst = 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.