In order to update information which appears in the Biographical section of the record (see #1 in screen shot below), you will need to use the CRecord object. To update information in relationship record (see #2 in the screen shot below) you can use the CIndividual2 object. Two examples in VB of updating these sections appear below.

Relationship Record

Public Sub UpdateSpouseRecord()

   Dim oSpouseRec As CRecord
   Set oSpouseRec = New CRecord
   oSpouseRec.Init REApplication.SessionContext

   Dim oRels As CIndividuals2
   Set oRels = New CIndividuals2

   oRels.Init REApplication.SessionContext, 280  'Load the Constituent record with spouse relationship

   Dim oRel As CIndividual2
   Dim lid As Long

    For Each oRel In oRels
        If oRel.Fields(INDIVIDUAL2_fld_IS_SPOUSE) = -1 Then  ' Find the Spouse Relationship record

               lid = oRel.Fields(INDIVIDUAL2_fld_PARENT_SPOUSE_ID)
               oSpouseRec.Load lid   'Load the spouse's record
               
               Debug.Print "Relation Code: " & oRel.Fields(INDIVIDUAL2_fld_RELATION_CODE)
               Debug.Print "Sys Rec ID: " & oRel.Fields(INDIVIDUAL2_fld_CONSTIT_ID)
               Debug.Print "Sys Rec ID of spouse: " & oRel.Fields(INDIVIDUAL2_fld_ID)
               Debug.Print "=================================="
               lid = oRel.Fields(INDIVIDUAL2_fld_PARENT_SPOUSE_ID)
               oSpouseRec.Load lid   'Load the spouse's record by sys rec id
                With oSpouseRec
                    Debug.Print "Constituent?: " & .Fields(RECORDS_fld_IS_CONSTITUENT) ''0=False, -1=True
                    .Fields(RECORDS_fld_DECEASED) = "-1" ''0=Not Deceased, -1=Deceased
                    .Fields(RECORDS_fld_DECEASED_DATE) = "11/18/2017"
                    .Fields(RECORDS_fld_FIRST_NAME) = "Jennie"
                    .Fields(RECORDS_fld_LAST_NAME) = "Smithe"
                    .Fields(RECORDS_fld_TITLE_1) = "Ms."
                    .Save ''Save changes to record
                    Debug.Print "Spouse record updated!"
                    Debug.Print "=================================="
               End With
            Else
             Debug.Print "Not a spouse record"
       End If
   Next oRel
   
''Cleanup
oSpouseRec.Closedown
Set oSpouseRec = Nothing
oRels.Closedown
Set oRels = Nothing

End Sub


Public Sub UpdateRelationship()
  
   Set oRelation = New CIndividual2
   oRelation.Init REApplication.SessionContext
   
   oRelation.Load 607, False ''Turn off the read-only flag
   
    With oRelation
       .Fields(INDIVIDUAL2_fld_RECIP_RELATION_CODE) = "Brother"
       .Fields(INDIVIDUAL2_fld_RELATION_CODE) = "Sister"
       .Fields(INDIVIDUAL2_fld_DATE_FROM) = "11/16/2016"
       .Save
    End With

   oRelation.Closedown
   Set oRelation = 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.