Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012

    Question Unanswered: Send email or create outlook task based on a access date field

    Hi all,

    I'm trying to get access to send out an email to the assigned user when a project is due within, say 3 days.

    I have a table called "tblProject" and it contains a date field named "DateDue" then I created a form based off that table named "frmProject"

    I would like access to send an email or create an outlook task when that "DateDue" field is 3 days away.

    I have tried creating a macro using the action catalog but I can't get it to work. I followed a youtube video with a smiliar function.

    I used the IF function and typed the following:
    [Forms]![frmDiscovery]![DateDue]= Now()-3
    I even tried using a specific date to test but no go:

    Then the following was filled
    "Object Type: Form"
    "Object Name: frmProject"
    "Output Format: HTMl"
    etc etc

    I also searched many threats but no luck yet.

    I found the following code in this thread but I'm having a hardtime modifying to fit my need

    Private Sub cmdSend_Click()
    Dim NowDate As Date
    Dim DateEnd As Date
    Dim DateDif As Long
    Dim Task As Object
    Set Task = Outlook.CreateItem(olTaskItem)
    NowDate = Now()
    DateEnd = DateDue.Value
    If DateAdd("d", -1, DateEnd) >= 1 Then
    DateEnd = DateAdd("d", -1, DateEnd)
    End If
    Task.Subject = "You have been assigned task " & ConfirmationID.Value
    Task.Body = "Please check the Task database for more information."
    Task.DueDate = DateEnd
    Task.Importance = (olImportanceHigh)
    Task.ReminderSet = True
    End Sub

    Any help is greatly appreciated!

  2. #2
    Join Date
    Dec 2012
    Still can't figure this one out. Anyone? Thanks again

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 14
    Quote Originally Posted by AccessN00b View Post
    I found the following code in this thread but I'm having a hardtime modifying to fit my need help is greatly appreciated!
    Help us to help you by being more specific. What kind of problem do you have with that code ? What does not work, which are the errors (if any) when it's run? Also precise the version of Office you use, it can matter.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts