S
Sherwood
Greetings,
I have the following line of code in Outlook 2000 and am receiving a
run-time error 13 ("Type Mismatch") when I try to execute it:
myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
I'm trying to concatenate a date (contained in a variable) to a literal time
(e.g., "8:00:00 AM") in order to create a new appointment item. However, my
syntax must be wrong due to the error I am receiving.
Here is the entire "IF" statement:
If Not IsNull(rs.Fields("Lic Renewal Submit By").Value) Then
dteLicRenewalSubmitBy = rs.Fields("Lic Renewal Submit By").Value
Set myApptItem = myOlApp.CreateItem(olAppointmentItem)
myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
myApptItem.End = dteLicRenewalSubmitBy & #8:30:00 AM#
myApptItem.Subject = "License Renewal Submit By"
myApptItem.Body = strState & Chr(13) & "License Renewal Submit
By " & dteLicRenewalSubmitBy
myApptItem.Close (olSave)
Set myApptItem = Nothing
End If
Thanks in advance!
I have the following line of code in Outlook 2000 and am receiving a
run-time error 13 ("Type Mismatch") when I try to execute it:
myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
I'm trying to concatenate a date (contained in a variable) to a literal time
(e.g., "8:00:00 AM") in order to create a new appointment item. However, my
syntax must be wrong due to the error I am receiving.
Here is the entire "IF" statement:
If Not IsNull(rs.Fields("Lic Renewal Submit By").Value) Then
dteLicRenewalSubmitBy = rs.Fields("Lic Renewal Submit By").Value
Set myApptItem = myOlApp.CreateItem(olAppointmentItem)
myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
myApptItem.End = dteLicRenewalSubmitBy & #8:30:00 AM#
myApptItem.Subject = "License Renewal Submit By"
myApptItem.Body = strState & Chr(13) & "License Renewal Submit
By " & dteLicRenewalSubmitBy
myApptItem.Close (olSave)
Set myApptItem = Nothing
End If
Thanks in advance!