T
Tim_Pope
I am using the following code in an Access database to create an Outlook Task
Item automatically. All is fine, except that the Reminder Date is always
incorect. Any suggestions as to why, or more impoortantly, how to fix the
problem, would be appreciated.
Public Sub SetReminder()
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Dim RemDate As Date
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
RemDate = Forms!frm_Action_New.RemindMe
With OutlookTask
.Subject = "Auto-Reminder for Item Reference - " & Me.Item_Ref
.Body = "Action:" & vbCrLf & Me.Action_Note & vbCrLf & vbCrLf _
& "Business Owner:" & vbCrLf & Me.Action_Bus_Owner & vbCrLf & vbCrLf _
& "Target date for completion:" & vbCrLf & Me.Target_Date
.StartDate = Date
.ReminderSet = True
.ReminderTime = RemDate & " " & CDate(#9:00:00 AM#)
.DueDate = Me.Target_Date
.Categories = "AutoReminder"
.ReminderPlaySound = True
.ReminderSoundFile = "C:\Windows\Media\Ding.wav"
.Save
End With
End Sub
Item automatically. All is fine, except that the Reminder Date is always
incorect. Any suggestions as to why, or more impoortantly, how to fix the
problem, would be appreciated.
Public Sub SetReminder()
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Dim RemDate As Date
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
RemDate = Forms!frm_Action_New.RemindMe
With OutlookTask
.Subject = "Auto-Reminder for Item Reference - " & Me.Item_Ref
.Body = "Action:" & vbCrLf & Me.Action_Note & vbCrLf & vbCrLf _
& "Business Owner:" & vbCrLf & Me.Action_Bus_Owner & vbCrLf & vbCrLf _
& "Target date for completion:" & vbCrLf & Me.Target_Date
.StartDate = Date
.ReminderSet = True
.ReminderTime = RemDate & " " & CDate(#9:00:00 AM#)
.DueDate = Me.Target_Date
.Categories = "AutoReminder"
.ReminderPlaySound = True
.ReminderSoundFile = "C:\Windows\Media\Ding.wav"
.Save
End With
End Sub