Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook task via Access_reminders

Status
Not open for further replies.

valmatic

IS-IT--Management
Mar 30, 2006
14
US
Hi. I have created a button that sends an outlook task but I can't get the reminder or the reminder sound to work. The task is received with no reminder or sound yet the assigned due date is populated ok. I'm lost - does anyone have any ideas? Here's the code I'm using:

Private Sub QA1_Click()
On Error GoTo Err_QA1_Click

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("bobi")
myItem.Subject = "New CAPA submitted for your review Bob " & "CAPA # " & CAPA_No
myItem.ReminderSet = True
myItem.ReminderTime = DateAdd("n", 5, Now)
myItem.DueDate = DateAdd("d", 2, Now)
myItem.ReminderPlaySound = True
myItem.ReminderSoundFile = "S:\capareview.wav"
myItem.Send

[Assigned_Verified_By] = "BobI"

Exit_QA1_Click:
Exit Sub

Err_QA1_Click:
MsgBox Err.Description
Resume Exit_QA1_Click

End Sub

thanks, Josh
 
On the same note, how would I set a reminder prior to the due date. If I change the line oc code above to:

myItem.DueDate = [duedate]

then how would I set the reminder date 1 month prior to the due date?

Sorry, I'm a noob coder learning as I go so any help would be huge to me :)

thanks in advance..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top