Private Sub TestRegFeeGift()

Dim oGift As CGift
Set oGift = New CGift

oGift.Init REApplication.SessionContext
oGift.Load 2016

Dim lAmount As Long
lAmount = oGift.Fields(GIFT_fld_Amount)

oGift.ParticipantLinker.LinkAsRegistrationFees

With oGift.ParticipantLinker.ParticipantRegFees.Add
.Fields(GIFTPARTICIPANT_fld_Amount) = lAmount
.Fields(GIFTPARTICIPANT_fld_ParticipantId) = 320
End With

oGift.Save

oGift.Closedown
Set oGift = Nothing

End Sub