I have a button in Access that runs this piece of code:
Private Sub Outlook_Click()
On Error GoTo Add_Err
'Save record first to be sure required fields are filled.
Dim objOutlook As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Dim objRecurPattern As Outlook.RecurrencePattern
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)
.Start = Me!datetobecompleted & " " & Me!StartTime
.Duration = Me!DurationTime
.Subject = Me!Device
'Release the AppointmentItem object variable.
Set objAppt = Nothing
'Release the Outlook object variable.
Set objOutlook = Nothing
'save the record, display a message.
MsgBox "Appointment Added!"
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
However, when I run it, it comes up with an error saying "Error 94 - Invalid use of Null"
Why am I getting this?????