A family of Microsoft relational database management systems designed for ease of use.
Is this database an MDB or ACCDB? When did this problem start? Have you confirmed all References?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Is this database an MDB or ACCDB? When did this problem start? Have you confirmed all References?
Still having problems. How can I included the database? The following is what I am using:
Table: Medications and Cost Table
Query: Medications and Cost Table Query
Form: Medications and Cost Table
Report: 30/90 Date Report
Umm Mark, Of course my response didn't resolve the problem. How can you expect anyone to resolve the problem without seeing the code that is causing the error?
Did you copy and paste that code from the editor? If you did I see one problem right off the bat.
Set OutLookApp = CreateObject("outllok.application")
outlook is misspelled!
There is also another error in this line
.ReminderTime = Me.Duedat - 3 & " 8:00 AM"
Shouldn't that be Me.Duedate?
The rest of the code looks OK. Fix those problems and see if it works.
Here is the entire code I got from a youtube video.
Option Compare Database
Private Sub Add_Task_to_Outlook_Click()
Dim OutLookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Set OutLookApp = CreateObject("outllok.application")
Set OutlookTask = OutLookApp.CreateItem(olTaskItem)
With OutlookTask
.Subject = "Reminder for Task: " & Me.TaskName
.Body = "This is a reminder from Access 3 days before due. Task name: " & Me.TaskName & " is due on " & Me.Dutedate
.ReminderSet = True
.DueDate = MeDueDate
'remind 3 days before task due
.ReminderTime = Me.Duedat - 3 & " 8:00 AM"
.ReminderPlaySound = True
.ReminderSoundFile = "C:\folder\file.wave"
.Save
End With
MsgBox "Task has been set in Outlook successfully. " vbInformation, "Set Task Confirmed"
End Sub
Private Sub Form_Current()
End Sub
Hi Mark, I'm an independent adviser and will try to help.
However, to help I need to see the code behind the button you are pressing. The error message tells you that something is wrong with the code. But it doesn't specify what. So we need to see that code.
Please copy and paste the code into a response so I can try to help.