I have a form, frm_Log, that people use to document phone calls from clients. If the phone call is a client complaint, the check box, chk_Complaint, will be checked. Clicking this check box sends an outlook task to the department manager to respond to the client within a specified amount of days. All these information is saved in tbl_Complaint.
tbl_Complaint
ComplaintID (autonumber)
Name (name of person taking the call)
Client (text)
Complaint (memo)
Date of complaint (date)
Client Complaint (yes/no)
Here is the code for sending the task:
Dim OutlookApp As New Outlook.Application, OutlookTask As Outlook.TaskItem
Dim AssignedTo As Outlook.Recipient, olNS As Outlook.NameSpace
Dim Email As String, frm as Form
Set OutlookApp = CreateObject("Outlook.Application")
Set olNS = OutlookApp.GetNamespace("MAPI")
olNS.Logon
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
Set frm = Forms![frm_Complaint]
Email = "managername@company.com"
OutlookTask.Assign
Set AssignedTo = OutlookTask.Recipients.Add(Email)
OutlookTask.Subject = frm!cbo_client & " has a complaint. See Complaint Number " & _
frm!ComplaintID & " to view the complaint."
OutlookTask.Body = frm!txt_Complaint
OutlookTask.DueDate = date + 14
OutlookTask.Importance = (olImportanceHigh)
OutlookTask.ReminderSet = True
OutlookTask.Save
OutlookTask.Send
OutlookTask.Display
OutlookApp.Quit
Set OutlookTask = Nothing
My manager wants it so that he can click on a hyperlink or something in the body of the task and that would take him directly to the specific complaint identified by the ComplaintID. Is this even possible? I would appreciate any ideas or help with this.
Thanks
tbl_Complaint
ComplaintID (autonumber)
Name (name of person taking the call)
Client (text)
Complaint (memo)
Date of complaint (date)
Client Complaint (yes/no)
Here is the code for sending the task:
Dim OutlookApp As New Outlook.Application, OutlookTask As Outlook.TaskItem
Dim AssignedTo As Outlook.Recipient, olNS As Outlook.NameSpace
Dim Email As String, frm as Form
Set OutlookApp = CreateObject("Outlook.Application")
Set olNS = OutlookApp.GetNamespace("MAPI")
olNS.Logon
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
Set frm = Forms![frm_Complaint]
Email = "managername@company.com"
OutlookTask.Assign
Set AssignedTo = OutlookTask.Recipients.Add(Email)
OutlookTask.Subject = frm!cbo_client & " has a complaint. See Complaint Number " & _
frm!ComplaintID & " to view the complaint."
OutlookTask.Body = frm!txt_Complaint
OutlookTask.DueDate = date + 14
OutlookTask.Importance = (olImportanceHigh)
OutlookTask.ReminderSet = True
OutlookTask.Save
OutlookTask.Send
OutlookTask.Display
OutlookApp.Quit
Set OutlookTask = Nothing
My manager wants it so that he can click on a hyperlink or something in the body of the task and that would take him directly to the specific complaint identified by the ComplaintID. Is this even possible? I would appreciate any ideas or help with this.
Thanks