This is my first post on this forum as I have a peculiar type mismatch problem. I have two PC's running the same Access program and on one it's fine but the other exhibits this Type Mismatch error 13.
The VBA is in Form (frmClientCALLReminder) and is as follows:
'==================== START of Form code =================================
Private Sub AddAppt_Click()
' Comments:
' Params :
' Modified:
On Error GoTo Err_AddAppt_Click
' Save record
DoCmd.RunCommand acCmdSaveRecord
Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
' This next line causes the type mismatch.
.Start = Me!ApptDate & " " & Me!cmbApptTime
.Duration = Me!ApptLength
.Subject = Me!Appt
If Not IsNull(Me!ApptNotes) Then
.Body = Me!ApptNotes
End If
If Not IsNull(Me!ApptLocation) Then
.LOCATION = Me!ApptLocation
End If
If Me!ApptReminder Then
.ReminderMinutesBeforeStart = Me!ReminderMinutes
.ReminderSet = True
End If
.Save
End With
blnCreateReminder = True
' Release the Outlook object variable.
Set outobj = Nothing
' Set the AddedToOutlook flag, save the record, display a message.
Me!AddedToOutlook = True
DoCmd.RunCommand acCmdSaveRecord
'Disabled message for now
MsgBox "Reminder added to Outlook"
Me.Appt = ""
Me.ApptDate = 0
'Me.ApptTime = 0
Me.ApptNotes = ""
DoCmd.Close
Exit Sub
Exit_AddAppt_Click:
Exit Sub
Err_AddAppt_Click:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Resume Exit_AddAppt_Click
End Sub
'==================== END of Form code =================================
VBA References as follows:
I would appreciate any suggestions as to what it might be. Right now it seems to be machine specific.
Thanks in advance.