Welcome to Forums Sign in | Join | Help | Forums
in Search


Adding a gift amendment

Last post 04-19-2007 2:01 AM by Gary Hay. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-19-2007 2:01 AM

    Adding a gift amendment

    Hi, Knowledgebase no. BB248354 shows how to add a gift amendment with the amount field specified. I'm trying to do a similar thing where we want to specify the Date_1st_Pay and Schedule_Month fields, but I keep getting error 6 'Overflow'. The code is as below: ' get Recurring Gift record objGift.Load lngGiftId ' lngGiftId previously specified ' amend recurring gift schedule if not single month payment If strDescriptionFrequency <> "Monthly" And intRenewEvery <> 1 Then varDate = Format(DateAdd("m", 1 - intRenewEvery, CVar(objGift.Fields(GIFT_fld_NextTransactionDate))), "dd/mm/yyyy") ' adjust date to next month With objGiftAmendServer .Init REApplication.SessionContext, objGift Set objGiftAmend = .AddAmendment() With objGiftAmend .Fields(AMENDMENT_fld_Date_1st_Pay) = CDate(Format(varDate, "dd/mm/yyyy")) .Fields(AMENDMENT_fld_Schedule_Month) = Month(CDate(varDate)) End With .Validate .Save End With objGiftAmendServer.Closedown System.SetToNothing objGiftAmendServer, objGiftAmend objGiftRG.Closedown objGift.GenerateSchedule End If objgift.closedown If any one could help with this we would be very appreciative. Cheers, Gary Hay TWS Australia
Page 1 of 1 (1 items)