You could do this yourself. Anyway:
lnDaysInMonth = Day(Gomonth(m.ldCurrent,1)-Day(Gomonth(m.ldCurrent,1)))
Do Case
Case m.ix = 0
lnAmount = m.lnPayment * ((Day(m.ldTo)-Day(m.ldCurrent))/(m.lnDaysInMonth-1))
Case m.ix = .txtMonths.Value
lnAmount = m.lnPayment * ((Day(m.ldCurrent)-1)/(m.lnDaysInMonth-1))
Otherwise
lnAmount = m.lnPayment
Endcase
Cetin
>hi,
>
>i mean if i start 01/07/2006 or 14/07/2006 and month 1,3,5,7,8,10 and month 12,it works,
>
>but if i start as 01/06/2006 or month 9,4,11 wrong result at first date and last date at the grid.
>
>and big deferrent value if i start with month2,
>
>just try any number ex.. 800.
>
>thanks.
>