Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email using criteria

Status
Not open for further replies.

jmhicsupt

MIS
Oct 22, 2005
49
US
I want to add a criteria to the below code. Right now it is sending only to one recipient, which is fine. However, when a particular checkbox is checked, I want to also send to the department manager for that particular checkbox. So if ckbox1=True, then in addition send the email to: "jackdoe@yahoo.com".

Private Sub txtbccx_AfterUpdate()
If txtbccx = "Oranges" Then
[txtBCC] = "johndoe@yahoo.com"
End If
If txtbccx = "Peaches" Then
[txtBCC] = "suzyq@yahoo.com"
End If

End Sub

How would I put that additional criteria here?

Thanks in advance.
 
Here is how checkboxes defined
Code:
Private Sub MychkBox_AfterUpdate()
    If Me.MychkBox.Value = True Then
        Me.MyTextBox = "Info1"
    Else
        Me.MyTextBox = "Info2"
    End If
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
My father was a realistic father; not a vending machine dispense everything I demanded for!!
 
I believe you can just separate the list of recipients with a semicolon, so as follows (untested code, just doing this off the top of my head):

Code:
If ckbox.Value = True Then
   txtBcc = txtBcc & ";jackdoe@yahoo.com"
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top