I have the form to set up to email me, but I want it to email the person who put in the trouble call, when I fill in my part of the form. I made an unbound field (Text17) and the code recognized it. i.e. When I pointed to it, a bubble came up and showed what I had entered into the field. I entered my email address again for testing purpose. So how can I get Access & Outlook to recognize that email address? Thanks.
In case you don't understand:
Table: Customer Service
Forms: Customer Trouble Call Log & Technician Repair Log
The fields in the code are:
Trouble Call Ticket
Username
Tech
Text17
Here is the code:
Private Sub Command20_Click()
Dim olApp As Object, olMail As Object
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "abc@xyz.mil" & Text17
.Subject = "Trouble Call Ticket" & Trouble_Call_Ticket_Number & "has been closed."
.Body = Username & vbCrLf & "Your trouble call ticket has been closed. If you have further information, please contact me." & vbCrLf & vbCrLf & "v/r" & Tech
.DeleteAfterSubmit = True
.Send
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
In case you don't understand:
Table: Customer Service
Forms: Customer Trouble Call Log & Technician Repair Log
The fields in the code are:
Trouble Call Ticket
Username
Tech
Text17
Here is the code:
Private Sub Command20_Click()
Dim olApp As Object, olMail As Object
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "abc@xyz.mil" & Text17
.Subject = "Trouble Call Ticket" & Trouble_Call_Ticket_Number & "has been closed."
.Body = Username & vbCrLf & "Your trouble call ticket has been closed. If you have further information, please contact me." & vbCrLf & vbCrLf & "v/r" & Tech
.DeleteAfterSubmit = True
.Send
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub