Hi Everybody,
Me again, im hoping this is my last question as I have been playing all day and lost the plot haha!
I have created a Query that lists all email addresses that need to receive an email notification when we raise an incident in the database.
The query is called Qry_NotificationEmail and the field that I want to concatenate is called Email.
I currently have vba code linked to a button to generate a pre-populated email, but i have to manually enter the email addresses either into Outlook or the vba. I want it to be able to pull from the query in the event I move on / leave etc.
We are using Outlook 365 using the Desktop Application.
Any help / guidance as always is really appreciated
All the best
Stuart
P.S. If anyone fancies telling me how to add a light blue background to the above code, please feel free ha-ha. It's a nice to have that I will play with in the future.
Me again, im hoping this is my last question as I have been playing all day and lost the plot haha!
I have created a Query that lists all email addresses that need to receive an email notification when we raise an incident in the database.
The query is called Qry_NotificationEmail and the field that I want to concatenate is called Email.
I currently have vba code linked to a button to generate a pre-populated email, but i have to manually enter the email addresses either into Outlook or the vba. I want it to be able to pull from the query in the event I move on / leave etc.
We are using Outlook 365 using the Desktop Application.
Code:
Private Sub Email_Notification_Button_Click()
Dim ccto As String
Dim bccto As String
Dim mailto As String
'Mail Recipients
mailto = ""
ccto = ""
bccto = ""
'Email Subject
mailsub = "New Incident: " & Me.Incident_ID & ""
'Email Message
emailmsg = "Incident ID: " & Me.Incident_ID & vbNewLine & "Category: " & Me.Category & vbNewLine & "Customer: " & Me.Customer & vbNewLine & "Title: " & Me.Title & vbNewLine & vbNewLine & "Please liaise with the Engineering Team for further information in relation to the above incident"
On Error Resume Next
DoCmd.SendObject acSendNoObject, , , mailto, ccto, bccto, mailsub, emailmsg, True
End Sub
Any help / guidance as always is really appreciated
All the best
Stuart
P.S. If anyone fancies telling me how to add a light blue background to the above code, please feel free ha-ha. It's a nice to have that I will play with in the future.