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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to proceed with task

Status
Not open for further replies.

mrbboy

Technical User
Feb 28, 2007
136
US
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
 
Possible certainly, given 30seconds thought, one idea is. When you create the task, also create a report of the complaint details and save as a txt file (or possibly a pdf, or access Snapshot file) in a folder. Give the file a know name, for example ComplaintNo.txt, and include the full path to the file in your task message as a hyperlink.

It is probably possible to write Outlook automation code, to open Access, and open a form positioned on the relevant complaint record. Not something I have done before, but possible I would have thought.

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi mrbboy,

There is another thread that asks about opening pdf documents I was reading the other day which might be useful, the link is , the thread title is "Open PDF using Command Button and a Text Box" and the last post date is 14 Dec 07 (i put in the thread title and post date just incase the link doesnt work for some reason and you can look for it).

Hope this helps you,

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top