platypus71
Technical User
Okay, I looked through the forums and I'm left scratching my head in confusion. I've never written any VB script and have had very little exposure to it.
Here is what I want to accomplish:
Send email to anyone listed as having a class tomorrow.
I've setup a Query that takes the three tables the information comes from, filters down to just the people who should get the email and has all information I need.
Here is my query:
What I need is the VB code to write an email that does the following:
Send individual message to everyone who shows up in the UserID field from the query.
The subject of the message should be "REMINDER: You have a class tomorrow"
The body of the message should read:
This is just a reminder that you have (CourseName) beginning on (StartDate) and ending on (EndDate) at (Location) from (Time).
Since we aren't using Outlook, I have special email code to allow me to send the email. My email code uses this function: SendEmail(strTo, strMessage, strAttachment, strSubject, strBCC). So basically, what I need is to create a strTo and strMessage based on the query for each instance of UserID from the query.
As I said, I have not had any success writing my own VB script, so any help would be appreciated.
Thanks.
Here is what I want to accomplish:
Send email to anyone listed as having a class tomorrow.
I've setup a Query that takes the three tables the information comes from, filters down to just the people who should get the email and has all information I need.
Here is my query:
Code:
SELECT ReconReport.EventID, Courses.CourseID, Courses.CourseName, ReconReport.StartDate, ReconReport.EndDate, ReconReport.Location, ReconReport.Time, Roster.[User ID] AS UserID, Roster.Status
FROM (Courses INNER JOIN ReconReport ON Courses.CourseID = ReconReport.CourseID) INNER JOIN Roster ON ReconReport.EventID = Roster.EventID
WHERE (((ReconReport.StartDate)>(Now()+1) And (ReconReport.StartDate)<(Now()+2)) AND ((Roster.Status)="enrolled"));
What I need is the VB code to write an email that does the following:
Send individual message to everyone who shows up in the UserID field from the query.
The subject of the message should be "REMINDER: You have a class tomorrow"
The body of the message should read:
This is just a reminder that you have (CourseName) beginning on (StartDate) and ending on (EndDate) at (Location) from (Time).
Since we aren't using Outlook, I have special email code to allow me to send the email. My email code uses this function: SendEmail(strTo, strMessage, strAttachment, strSubject, strBCC). So basically, what I need is to create a strTo and strMessage based on the query for each instance of UserID from the query.
As I said, I have not had any success writing my own VB script, so any help would be appreciated.
Thanks.