views:

25

answers:

0

hello, I am trying to update a control in a subform. Actually I am calculating the number of months. here is the code: (which doesn't work!)

 While (Not Me.Form.Recordset.EOF)
months = Round((Me.End - Me.Start) / 30, 0)
Form_FinanceSubform.[number of months] = 0
Me.[number of months] = months
Me.Form.Recordset.MoveNext
Wend

the error i get is: "this action was cancelled by an associated object" on the line Me.Form.Recordset.MoveNext

could someone please help me out here?? thanks!