Please help: Send object when argument satisfies

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

Hi there,

I'm quite new at this and really could use some help. I have created a
database that stores contacts and their details. In addition to this I
needed to put in a function to remind me to call them after a period
of time (a day, week, month etc..). So what I did was to create a
subroutine within the main contacts form as follows

Private Sub On_Timer()
If = True Then

If [FollowUpDate] < Date Then

DoCmd.RunMacro "Contact Form Macros.SendEmail", 1
[Email] = False

End If

End If

End Sub

Where [Email] is a tick box to confirm that the user wants to send an
email and the Macro sends an email using the fields of the displayed
record to populate the to and subject fields.

However, I have realised that this will only send the email when the
user looks at that specific record and so is a little useless as a
reminder. Does anyone have any suggestions on how I can create an
email reminder system based on all of the records stored in the
contact table?

Any help would be great and stop my hair tugging!!!

Cheers
 
Ryan,

Seeing as no one has attempted to answer I'll give you a few general
suggestions.
I do something like this with a command button that opens a contious
form with a query as a record source. The query selects the all
records that I've designated as needing an email sent. When I click
the email button I loop through the recordset of the query and send
each of the recipents a report via sendobject based on their
information. When I close the form I have another query that updates
each record showing the email has been sent. You didn't say what type
of email you are sending so you may have to use some different
approach.

Hope that helps

Rick
 
Back
Top