Public Sub UpdateLetterCode()

   Dim oGift As CGift
   Dim oGift2 As IBBGift2
   Dim oAmServer As CAmendmentServer
   Dim oAmend As IBBAmendment
   Dim oAmends As CGiftAmendments
   Dim lCount As Long
   Dim lID As Long
      
   Set oGift = New CGift
   oGift.Init REApplication.SessionContext
   oGift.Load 1284
  
   Set oGift2 = oGift
  
   Set oAmServer = New CAmendmentServer
   oAmServer.Init REApplication.SessionContext, oGift
  
   Set oAmends = oGift2.Amendments
   lCount = oAmends.Count
   Set oAmend = oAmends.Item(lCount)
   lID = oAmend.Fields(AMENDMENT_fld_ID)
   Set oAmend = oAmServer.EditAmendment(lID)
      
   oAmend.Fields(AMENDMENT_fld_LetterCode) = "General Thank You"

   oAmServer.Save

   oAmServer.CloseDown
   Set oAmServer = Nothing
      
   oGift.CloseDown
   Set oGift = Nothing
  
   Set oGift2 = Nothing
   Set oAmend = Nothing
   Set oAmends = 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. Blackbaud Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.