TeresePamela
Programmer
When running the code below as the on-click event of a button on a form, I receive the error message "Object doesn't support this property or method" when it gets to the line:
If vartype = "SPECIAL" Then
Can anyone tell me what I've done wrong?
I really, really appreciate all the help you guys are giving me.
Thanks
Pam
Private Sub SetFee_Click()
Dim dtExt1 As Date
Dim dtExt2 As Date
Dim dtExt3 As Date
Dim dtExt4 As Date
Dim dtExt5 As Date
Dim dtFeeDue As Date
Dim nmMonth As Integer
Dim vartype As String
Set Select1 = CurrentDb.OpenRecordset("Accounts")
Select1.MoveFirst
While Not Select1.EOF()
If IsNull(Select1.PYMT_RCVD) And Select1.Fee_Flag = "Y" Then
If vartype = "SPECIAL" Then
dtFeeDue = DateAdd("m", 3, Select1.DEADLINE)
Else
dtFeeDue = Select1.DUE_DATE
End If
dtExt1 = DateAdd("m", 1, dtFeeDue)
dtExt2 = DateAdd("m", 2, dtFeeDue)
dtExt3 = DateAdd("m", 3, dtFeeDue)
dtExt4 = DateAdd("m", 4, dtFeeDue)
dtExt5 = DateAdd("m", 5, dtFeeDue)
If Date > dtFeeDue And Date <= dtExt1 Then
nmMonth = 1
End If
If Date > dtExt1 And Date <= dtExt2 Then
nmMonth = 2
End If
If Date > dtExt2 And Date <= dtExt3 Then
nmMonth = 3
End If
If Date > dtExt3 And Date <= dtExt4 Then
nmMonth = 4
End If
If Date > dtExt4 And Date <= dtExt5 Then
nmMonth = 5
End If
Select1.Edit
Select1.EXT_MTHS = nmMonth
Select1.Update
End If
Select1.MoveNext
Wend
Beep
MsgBox "Procedure has Finished"
End Sub