Concatenating Date and Time

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!
 
M

Michael Bauer

Am Tue, 6 Sep 2005 17:13:57 -0700 schrieb Sherwood:

I suppose you need to add a space between the date and time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top