[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating Task using Access Database (2007)

Posted on 2012-08-15
2
Medium Priority
?
684 Views
Last Modified: 2012-08-15
I need help in fixing code so I can view an Outlook Task created from an Access 2007 database before assigning the task and sending it.  (current code is below)

I have a database that is for tracking action items.  When you create an actions item in Access, I want to be able to create a task in Outlook and send the task to the person assigned.  Using the code below, I can create the task, but only assign it to myself.  I need to be able to assign to to another staff member.  I do have a field for "Assinged To" in my database, but it may not be the same spelling as in the Outlook directory.

Is there a way to create the task in Access, but view the task before sending it?  This would allow me to choose the person assigned from the employee directory and then send the task.

Regards,
Carl


Current Code Used:
_____________________________

Private Sub Command63_Click()
         Dim appOutLook As Outlook.Application
         Dim taskOutLook As Outlook.TaskItem
         Set appOutLook = CreateObject("Outlook.Application")
         Set taskOutLook = appOutLook.CreateItem(olTaskItem)
      With taskOutLook
          .StartDate = Me.Start_Date
          .StatusReport = True
          .Subject = "You have been assigned task:" & Chr(1) & Me.Action_Item_Number & Chr(2) & Me.Task_Name
          .Body = Me.Description_of_Task
          .ReminderSet = True
          .ReminderTime = DateAdd("n", 2, Now)  ' Set to remind us 2
                                                ' minutes from now.
          .DueDate = Me.Date_to_Complete        ' Set the due date to
                                                ' 5 minutes from now.
          .ReminderPlaySound = True
           'add the path to a .wav file on your computer.
          .ReminderSoundFile = "C:\Win95\media\ding.wav"
          .Save
                   
      End With
     End Sub
0
Comment
Question by:csall
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38295860
change

.Save

with

.Display
0
 

Author Comment

by:csall
ID: 38299210
That worked great.  Thanks.

I also learned that I needed to remove the statement
          .ReminderSet = True

With that statement in there it removed the items from my outlooks so I can't track the status of the task.  

I appreciate your help.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question