F
FrankieNap
Hello all,
I am not a programmer, although I have been picking things up
along the way, so if any of my explanations sound rudimentary I
apologize in advance.
I have designed a database to keep track of my students, each
student record includes things like a Student ID (primary key),
firstname, lastname, email address, and various other contact
information. I want to be able to have a control on my form which
allows me to email my students with the click of a button. I am using
the SendObject function to open a new email, I then select
acSendNoObject. What I want to be able to do is automatically fill in
the bcc field (not the "to" field since I do not want my students
having every other person's email) with information from my table of
students. Their emails are stored in the field "Email-Student". I
also would like to restrict the recordset based on the value of
another field "Emailer" which either has the value "All", "Active", or
"Inactive" in order to be able to email all of my students (former and
current), my current students only, or only the students I have had in
the past. I figure that I would have to use an If,ElseIf function to
get this done.
The biggest problem I have is inserting the email addresses of my
students into the bcc field. I have searched online and have yet to
be able to figure it out. Below is a portion of the code I have
written (not very much, I know). Any information would be greatly
appreciated. Thank you.
If Me.Emailer = "Active" Then
DoCmd.SendObject acSendNoObject
I am not a programmer, although I have been picking things up
along the way, so if any of my explanations sound rudimentary I
apologize in advance.
I have designed a database to keep track of my students, each
student record includes things like a Student ID (primary key),
firstname, lastname, email address, and various other contact
information. I want to be able to have a control on my form which
allows me to email my students with the click of a button. I am using
the SendObject function to open a new email, I then select
acSendNoObject. What I want to be able to do is automatically fill in
the bcc field (not the "to" field since I do not want my students
having every other person's email) with information from my table of
students. Their emails are stored in the field "Email-Student". I
also would like to restrict the recordset based on the value of
another field "Emailer" which either has the value "All", "Active", or
"Inactive" in order to be able to email all of my students (former and
current), my current students only, or only the students I have had in
the past. I figure that I would have to use an If,ElseIf function to
get this done.
The biggest problem I have is inserting the email addresses of my
students into the bcc field. I have searched online and have yet to
be able to figure it out. Below is a portion of the code I have
written (not very much, I know). Any information would be greatly
appreciated. Thank you.
If Me.Emailer = "Active" Then
DoCmd.SendObject acSendNoObject