Creating Task using Access Database (2007)

Posted on 2012-08-15
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.


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"
      End With
     End Sub
Question by:csall
    LVL 119

    Accepted Solution





    Author Comment

    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.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now