youll have a form, on it is a list box.
the query to the list box is clients w contracts due within X days.
criteria: DateDiff("d",[ExpireDate],Date()) < 30 (or 90 or 180) You could also set this on the form as a combo box. Pick 1.
These emails will show in the list box. To send them emails:
Then click a Send button to run ScanAndEmail below.
It will run thru the list and send the report.
Code:
'------------
Public Sub ScanAndEmail()
'------------
dim i as integer
dim vTo
'go thru emails in the list box
For i = 0 To lstEAddrs.ListCount - 1
vTo = lstEAddrs.ItemData(i)
lstEAddrs = vTo
DoCmd.SendObject acSendReport, "rptReminder", acFormatPDF, lstEAddrs , , , txtSubject, txtBody
Next
End Sub