Private Sub GetAJob()

    Dim oTS As CTimeSheet
    Dim oTss As CTimeSheets
    Dim oRec As CRecord
    Set oRec = New CRecord
    Dim oEvent As CSpecialEvent
    Set oEvent = New CSpecialEvent
    oRec.Init REApplication.SessionContext
    oRec.Load 751
    Set oTss = oRec.Volunteer.Timesheets

    Dim oJob As CJob
    Set oJob = New CJob
    Dim lJobID As Long
    Dim lEventID As Long
    For Each oTS In oTss
        lJobID = oTS.Fields(Timesheet_fld_JOB_ID)
        oJob.Init REApplication.SessionContext
        oJob.Load lJobID
            Debug.Print oJob.Fields(Job_fld_EVENT_ID)
            Debug.Print oJob.Fields(Job_fld_CATEGORY)
            Debug.Print oJob.Fields(Job_fld_COMPLETED)
            Debug.Print ""

        lEventID = oJob.Fields(Job_fld_EVENT_ID)

        oEvent.Init REApplication.SessionContext
        oEvent.Load lEventID
            Debug.Print oEvent.Fields(SPECIAL_EVENT_fld_NAME)
            Debug.Print oEvent.Fields(SPECIAL_EVENT_fld_DESCRIPTION)
            Debug.Print ""
        Set oEvent = Nothing

        Set oJob = Nothing
    Next oTS

    Set oRec = 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