Setting the ReminderTime gives strange results

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
 
M

Michael Bauer

Am Wed, 24 May 2006 05:51:02 -0700 schrieb Tim_Pope:

What time do you expect and what is it instead?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top