derekstewart
MIS
I have a start date and end date for a contract and need to track the dates a rebate should be sent to us. Rebates can be quarterly, biannually or annually. As an example if we have a contract that starts on Jan 1 2007, ends in March 31, 2009 and has a quarterly rebate I would expect 9 rebates over the term of the contract. I would like to be able to run a report that will show the rebate schedule for the contract. The code below works but only shows the first period.
CODE
Public Function ReviewFrequency(Term as Integer) as Double
Select Case Term
Case <x1> to <x2>
ReviewFrequency = 90
Case <x2> to <x3>
ReviewFrequency = 180
Case <x3> to <x4>
ReviewFrequency = 365
Case Else
ReviewFrequency = 0
End Select
End Function
DateAdd("d", PeriodDays,StartDate)
I would like it to appear like this:
Contract Rebate Expected
Bank Contract 1a March 31, 2007
Bank Contract 1a June 30, 2007
Bank Contract 1a Sept 30, 2007
Bank Contract 2 Jan 1, 2008
Bank Contract 2 Jan 1, 2009
Any thoughts? Thanks. D
CODE
Public Function ReviewFrequency(Term as Integer) as Double
Select Case Term
Case <x1> to <x2>
ReviewFrequency = 90
Case <x2> to <x3>
ReviewFrequency = 180
Case <x3> to <x4>
ReviewFrequency = 365
Case Else
ReviewFrequency = 0
End Select
End Function
DateAdd("d", PeriodDays,StartDate)
I would like it to appear like this:
Contract Rebate Expected
Bank Contract 1a March 31, 2007
Bank Contract 1a June 30, 2007
Bank Contract 1a Sept 30, 2007
Bank Contract 2 Jan 1, 2008
Bank Contract 2 Jan 1, 2009
Any thoughts? Thanks. D