PC Review


Reply
Thread Tools Rate Thread

Connectiing to Outlook

 
 
=?Utf-8?B?YmFja21hbmI=?=
Guest
Posts: n/a
 
      15th Feb 2005
Here what I want to do.

I want to create a basic database, where the user types in the subject in
the subject textbox and then selects a start time, end time and then a picks
a date. After that the user clicks update and then the database automatically
updates my outlook calendar with the given information. So my question is, is
it possible to have Access automaticaly update your outlook calendar with
appointments.
 
Reply With Quote
 
 
 
 
JohnR
Guest
Posts: n/a
 
      16th Feb 2005
Yes go to
http://support.microsoft.com/?kbid=209963
For how
"backmanb" <(E-Mail Removed)> wrote in message
news:9086F3B1-8675-4FBD-ABBB-(E-Mail Removed)...
> Here what I want to do.
>
> I want to create a basic database, where the user types in the subject in
> the subject textbox and then selects a start time, end time and then a
> picks
> a date. After that the user clicks update and then the database
> automatically
> updates my outlook calendar with the given information. So my question is,
> is
> it possible to have Access automaticaly update your outlook calendar with
> appointments.



 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      16th Feb 2005
Yes. The code below is designed to be run directly from a FORM and
obtains the appropriate values from the fields on the form.

Sub createOutlookAppointment()

Dim objOutlook As Outlook.Application
Dim nms As Outlook.NameSpace
Dim mailbox As mapiFolder
Dim targetCalendar As mapiFolder
Dim newAppt As Outlook.AppointmentItem
Dim strBodyText As String
Dim strLocation As String

If [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] =
"" Or
IsNull([Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId]) =
True Then
DoCmd.Hourglass (True)
[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Accessing Outlook..."
[Forms]![frmReservationsEntryIndividual].Repaint
Set objOutlook = CreateObject("Outlook.application")
Set nms = objOutlook.GetNamespace("MAPI")
Set mailbox = nms.Folders(1)
Set targetCalendar = mailbox.Folders("Calendar")
Set newAppt = objOutlook.CreateItem(olAppointmentItem)

newAppt.UserProperties.Add "dbAccessID", olNumber
newAppt.UserProperties.Add "dbLastModified", olDateTime
newAppt.UserProperties.Add "dbStatus", olText

strBodyText = ""
strBodyText = strBodyText & "Date/Time: " &
[Forms]![frmReservationsEntryIndividual]![dteDate] & " " &
[Forms]![frmReservationsEntryIndividual]![dteTimeScheduled] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Status: " &
[Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1) & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Name Sign: " &
[Forms]![frmReservationsEntryIndividual]![txtNameSign] & Chr(13) & Chr(10)
strBodyText = strBodyText & "Passenger: " &
[Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName] &
Chr(13) & Chr(10)
strBodyText = strBodyText & "PAX Phone: " &
Format([Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerPhone],
"(000) 000-0000") & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Client:" &
[Forms]![frmReservationsEntryIndividual]![cboClient].Column(1) & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Contact: " &
[Forms]![frmReservationsEntryIndividual]![txtContactNameFirst] & " " &
[Forms]![frmReservationsEntryIndividual]![txtContactNameLast] & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Phone: " &
Format([Forms]![frmReservationsEntryIndividual]![txtContactPhone],
"(000) 000-0000") & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "From: " &
[Forms]![frmReservationsEntryIndividual]![cboOrigination] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "To: " &
[Forms]![frmReservationsEntryIndividual]![cboDestination] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Fare: " &
Format([Forms]![frmReservationsEntryIndividual]![curFare], "Currency") &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Vehicle: " &
[Forms]![frmReservationsEntryIndividual]![cboVehicleType].Column(1) &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Party Size: " &
[Forms]![frmReservationsEntryIndividual]![intNumberofPassengers] &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Car Seat: " &
[Forms]![frmReservationsEntryIndividual]![cboCarSeat] & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Comments:" & Chr(13) & Chr(10)
strBodyText = strBodyText &
[Forms]![frmReservationsEntryIndividual]![txtComments]

strLocation = DLookup("txtLocationShortDescription",
"tblLocations", "[txtLocationName] =
[Forms]![frmReservationsEntryIndividual]![cboOrigination]")
strLocation = strLocation & " - "
strLocation = strLocation &
DLookup("txtLocationShortDescription", "tblLocations",
"[txtLocationName] =
[Forms]![frmReservationsEntryIndividual]![cboDestination]")

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Creating new appointment..."
[Forms]![frmReservationsEntryIndividual].Repaint

With newAppt
.Start = [Forms]![frmReservationsEntryIndividual]![dteDate]
& " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
.End = [Forms]![frmReservationsEntryIndividual]![dteDate] &
" " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
.Subject =
[Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName]
.Location = strLocation
.UserProperties(1) =
[Forms]![frmReservationsEntryIndividual]![lngTransportID]
.UserProperties(2) = Now
.UserProperties(3) =
[Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1)
.Body = strBodyText
.BusyStatus = olBusy
.Categories = "Reservations"
.MessageClass = "IPM.Appointment.Reservations"
.Save
End With

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] = "New
appointment created"
[Forms]![frmReservationsEntryIndividual].Repaint

[Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] =
newAppt.EntryID

DoCmd.Hourglass (False)

If IsNull(newAppt.EntryID) = False Then
MsgBox ("Outlook appointment created.")
Else
MsgBox ("Unable to confirm that the Outlook appointment was
created.")
End If

Set newAppt = Nothing
Set targetCalendar = Nothing
Set mailbox = Nothing
Set nms = Nothing
Set objOutlook = Nothing
Else
MsgBox ("An Outlook appointment has already been scheduled for
this reservation.")
End If

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] = ""

End Sub

Sub changeOutlookAppointment()

Dim objOutlook As Outlook.Application
Dim nms As Outlook.NameSpace
Dim mailbox As mapiFolder
Dim targetCalendar As mapiFolder
Dim targetAppointmentGroup As Outlook.Items
Dim targetAppointment As Outlook.AppointmentItem
Dim i
Dim strBodyText As String
Dim flgAppointmentFound As Boolean
Dim strLocation As String


If [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] <>
"" And
IsNull([Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId]) =
False Then
DoCmd.Hourglass (True)
[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Accessing Outlook..."
[Forms]![frmReservationsEntryIndividual].Repaint
Set objOutlook = CreateObject("Outlook.application")
Set nms = objOutlook.GetNamespace("MAPI")
Set mailbox = nms.Folders(1)
Set targetCalendar = mailbox.Folders("Calendar")
Set targetAppointmentGroup =
mailbox.Folders("Calendar").Items.Restrict("[Start] > '#" & DateAdd("d",
-7, Date) & "#'")

i = 1
flgAppointmentFound = False
[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Searching for appointment..."
[Forms]![frmReservationsEntryIndividual].Repaint
While (i <= targetAppointmentGroup.Count)
[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Searching for appointment..." & Time()
[Forms]![frmReservationsEntryIndividual].Repaint
If targetAppointmentGroup.Item(i).EntryID =
[Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] Then
Set targetAppointment = targetAppointmentGroup.Item(i)
flgAppointmentFound = True
[Forms]![frmReservationsEntryIndividual]![txtAdvisory]
= "Appointment found"
[Forms]![frmReservationsEntryIndividual].Repaint
End If
i = i + 1
Wend

If flgAppointmentFound = False Then
MsgBox ("Unable to update Outlook appointment. The
appointment could not be found.")
Exit Sub
End If

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Preparing to update appointment..."
[Forms]![frmReservationsEntryIndividual].Repaint

targetAppointment.UserProperties.Add "dbAccessID", olNumber
targetAppointment.UserProperties.Add "dbLastModified", olDateTime
targetAppointment.UserProperties.Add "dbStatus", olText

strBodyText = ""
strBodyText = strBodyText & "Date/Time: " &
[Forms]![frmReservationsEntryIndividual]![dteDate] & " " &
[Forms]![frmReservationsEntryIndividual]![dteTimeScheduled] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Status: " &
[Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1) & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Name Sign: " &
[Forms]![frmReservationsEntryIndividual]![txtNameSign] & Chr(13) & Chr(10)
strBodyText = strBodyText & "Passenger: " &
[Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName] &
Chr(13) & Chr(10)
strBodyText = strBodyText & "PAX Phone: " &
Format([Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerPhone],
"(000) 000-0000") & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Client:" &
[Forms]![frmReservationsEntryIndividual]![cboClient].Column(1) & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Contact: " &
[Forms]![frmReservationsEntryIndividual]![txtContactNameFirst] & " " &
[Forms]![frmReservationsEntryIndividual]![txtContactNameLast] & Chr(13)
& Chr(10)
strBodyText = strBodyText & "Phone: " &
Format([Forms]![frmReservationsEntryIndividual]![txtContactPhone],
"(000) 000-0000") & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "From: " &
[Forms]![frmReservationsEntryIndividual]![cboOrigination] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "To: " &
[Forms]![frmReservationsEntryIndividual]![cboDestination] & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Fare: " &
Format([Forms]![frmReservationsEntryIndividual]![curFare], "Currency") &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Vehicle: " &
[Forms]![frmReservationsEntryIndividual]![cboVehicleType].Column(1) &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Party Size: " &
[Forms]![frmReservationsEntryIndividual]![intNumberofPassengers] &
Chr(13) & Chr(10)
strBodyText = strBodyText & "Car Seat: " &
[Forms]![frmReservationsEntryIndividual]![cboCarSeat] & Chr(13) & Chr(10)
strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
Chr(10)
strBodyText = strBodyText & "Comments:" & Chr(13) & Chr(10)
strBodyText = strBodyText &
[Forms]![frmReservationsEntryIndividual]![txtComments]

strLocation = DLookup("txtLocationShortDescription",
"tblLocations", "[txtLocationName] =
[Forms]![frmReservationsEntryIndividual]![cboOrigination]")
strLocation = strLocation & " - "
strLocation = strLocation &
DLookup("txtLocationShortDescription", "tblLocations",
"[txtLocationName] =
[Forms]![frmReservationsEntryIndividual]![cboDestination]")

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Updating appointment..."
[Forms]![frmReservationsEntryIndividual].Repaint

With targetAppointment
.Start = [Forms]![frmReservationsEntryIndividual]![dteDate]
& " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
.End = [Forms]![frmReservationsEntryIndividual]![dteDate] &
" " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
.Subject =
[Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName]
.Location = strLocation
.UserProperties(1) =
[Forms]![frmReservationsEntryIndividual]![lngTransportID]
.UserProperties(2) = Now
.UserProperties(3) =
[Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1)
.Body = strBodyText
.BusyStatus = olBusy
.Categories = "Reservations"
.Save
End With

[Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
"Appointment updated"
[Forms]![frmReservationsEntryIndividual].Repaint
DoCmd.Hourglass (False)

MsgBox ("Outlook appointment updated.")

Set targetAppointment = Nothing
Set targetAppointmentGroup = Nothing
Set targetCalendar = Nothing
Set mailbox = Nothing
Set nms = Nothing
Set objOutlook = Nothing
Else
MsgBox ("An Outlook appointment has not been scheduled for this
reservation.")
End If

End Sub


JohnR wrote:
> Yes go to
> http://support.microsoft.com/?kbid=209963
> For how
> "backmanb" <(E-Mail Removed)> wrote in message
> news:9086F3B1-8675-4FBD-ABBB-(E-Mail Removed)...
>
>>Here what I want to do.
>>
>>I want to create a basic database, where the user types in the subject in
>>the subject textbox and then selects a start time, end time and then a
>>picks
>>a date. After that the user clicks update and then the database
>>automatically
>>updates my outlook calendar with the given information. So my question is,
>>is
>>it possible to have Access automaticaly update your outlook calendar with
>>appointments.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?QXVzc2llSW5OWg==?=
Guest
Posts: n/a
 
      14th Apr 2005
David Thanks - that was a little feature "nice to have" I was planning to add
into my application when I got the time to get around to it. You have saved
me hours - gotta love these sites.


"David C. Holley" wrote:

> Yes. The code below is designed to be run directly from a FORM and
> obtains the appropriate values from the fields on the form.
>
> Sub createOutlookAppointment()
>
> Dim objOutlook As Outlook.Application
> Dim nms As Outlook.NameSpace
> Dim mailbox As mapiFolder
> Dim targetCalendar As mapiFolder
> Dim newAppt As Outlook.AppointmentItem
> Dim strBodyText As String
> Dim strLocation As String
>
> If [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] =
> "" Or
> IsNull([Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId]) =
> True Then
> DoCmd.Hourglass (True)
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Accessing Outlook..."
> [Forms]![frmReservationsEntryIndividual].Repaint
> Set objOutlook = CreateObject("Outlook.application")
> Set nms = objOutlook.GetNamespace("MAPI")
> Set mailbox = nms.Folders(1)
> Set targetCalendar = mailbox.Folders("Calendar")
> Set newAppt = objOutlook.CreateItem(olAppointmentItem)
>
> newAppt.UserProperties.Add "dbAccessID", olNumber
> newAppt.UserProperties.Add "dbLastModified", olDateTime
> newAppt.UserProperties.Add "dbStatus", olText
>
> strBodyText = ""
> strBodyText = strBodyText & "Date/Time: " &
> [Forms]![frmReservationsEntryIndividual]![dteDate] & " " &
> [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Status: " &
> [Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1) & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Name Sign: " &
> [Forms]![frmReservationsEntryIndividual]![txtNameSign] & Chr(13) & Chr(10)
> strBodyText = strBodyText & "Passenger: " &
> [Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName] &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "PAX Phone: " &
> Format([Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerPhone],
> "(000) 000-0000") & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Client:" &
> [Forms]![frmReservationsEntryIndividual]![cboClient].Column(1) & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Contact: " &
> [Forms]![frmReservationsEntryIndividual]![txtContactNameFirst] & " " &
> [Forms]![frmReservationsEntryIndividual]![txtContactNameLast] & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Phone: " &
> Format([Forms]![frmReservationsEntryIndividual]![txtContactPhone],
> "(000) 000-0000") & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "From: " &
> [Forms]![frmReservationsEntryIndividual]![cboOrigination] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "To: " &
> [Forms]![frmReservationsEntryIndividual]![cboDestination] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Fare: " &
> Format([Forms]![frmReservationsEntryIndividual]![curFare], "Currency") &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Vehicle: " &
> [Forms]![frmReservationsEntryIndividual]![cboVehicleType].Column(1) &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Party Size: " &
> [Forms]![frmReservationsEntryIndividual]![intNumberofPassengers] &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Car Seat: " &
> [Forms]![frmReservationsEntryIndividual]![cboCarSeat] & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Comments:" & Chr(13) & Chr(10)
> strBodyText = strBodyText &
> [Forms]![frmReservationsEntryIndividual]![txtComments]
>
> strLocation = DLookup("txtLocationShortDescription",
> "tblLocations", "[txtLocationName] =
> [Forms]![frmReservationsEntryIndividual]![cboOrigination]")
> strLocation = strLocation & " - "
> strLocation = strLocation &
> DLookup("txtLocationShortDescription", "tblLocations",
> "[txtLocationName] =
> [Forms]![frmReservationsEntryIndividual]![cboDestination]")
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Creating new appointment..."
> [Forms]![frmReservationsEntryIndividual].Repaint
>
> With newAppt
> .Start = [Forms]![frmReservationsEntryIndividual]![dteDate]
> & " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
> .End = [Forms]![frmReservationsEntryIndividual]![dteDate] &
> " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
> .Subject =
> [Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName]
> .Location = strLocation
> .UserProperties(1) =
> [Forms]![frmReservationsEntryIndividual]![lngTransportID]
> .UserProperties(2) = Now
> .UserProperties(3) =
> [Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1)
> .Body = strBodyText
> .BusyStatus = olBusy
> .Categories = "Reservations"
> .MessageClass = "IPM.Appointment.Reservations"
> .Save
> End With
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] = "New
> appointment created"
> [Forms]![frmReservationsEntryIndividual].Repaint
>
> [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] =
> newAppt.EntryID
>
> DoCmd.Hourglass (False)
>
> If IsNull(newAppt.EntryID) = False Then
> MsgBox ("Outlook appointment created.")
> Else
> MsgBox ("Unable to confirm that the Outlook appointment was
> created.")
> End If
>
> Set newAppt = Nothing
> Set targetCalendar = Nothing
> Set mailbox = Nothing
> Set nms = Nothing
> Set objOutlook = Nothing
> Else
> MsgBox ("An Outlook appointment has already been scheduled for
> this reservation.")
> End If
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] = ""
>
> End Sub
>
> Sub changeOutlookAppointment()
>
> Dim objOutlook As Outlook.Application
> Dim nms As Outlook.NameSpace
> Dim mailbox As mapiFolder
> Dim targetCalendar As mapiFolder
> Dim targetAppointmentGroup As Outlook.Items
> Dim targetAppointment As Outlook.AppointmentItem
> Dim i
> Dim strBodyText As String
> Dim flgAppointmentFound As Boolean
> Dim strLocation As String
>
>
> If [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] <>
> "" And
> IsNull([Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId]) =
> False Then
> DoCmd.Hourglass (True)
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Accessing Outlook..."
> [Forms]![frmReservationsEntryIndividual].Repaint
> Set objOutlook = CreateObject("Outlook.application")
> Set nms = objOutlook.GetNamespace("MAPI")
> Set mailbox = nms.Folders(1)
> Set targetCalendar = mailbox.Folders("Calendar")
> Set targetAppointmentGroup =
> mailbox.Folders("Calendar").Items.Restrict("[Start] > '#" & DateAdd("d",
> -7, Date) & "#'")
>
> i = 1
> flgAppointmentFound = False
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Searching for appointment..."
> [Forms]![frmReservationsEntryIndividual].Repaint
> While (i <= targetAppointmentGroup.Count)
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Searching for appointment..." & Time()
> [Forms]![frmReservationsEntryIndividual].Repaint
> If targetAppointmentGroup.Item(i).EntryID =
> [Forms]![frmReservationsEntryIndividual]![txtOutlookEntryId] Then
> Set targetAppointment = targetAppointmentGroup.Item(i)
> flgAppointmentFound = True
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory]
> = "Appointment found"
> [Forms]![frmReservationsEntryIndividual].Repaint
> End If
> i = i + 1
> Wend
>
> If flgAppointmentFound = False Then
> MsgBox ("Unable to update Outlook appointment. The
> appointment could not be found.")
> Exit Sub
> End If
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Preparing to update appointment..."
> [Forms]![frmReservationsEntryIndividual].Repaint
>
> targetAppointment.UserProperties.Add "dbAccessID", olNumber
> targetAppointment.UserProperties.Add "dbLastModified", olDateTime
> targetAppointment.UserProperties.Add "dbStatus", olText
>
> strBodyText = ""
> strBodyText = strBodyText & "Date/Time: " &
> [Forms]![frmReservationsEntryIndividual]![dteDate] & " " &
> [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Status: " &
> [Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1) & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Name Sign: " &
> [Forms]![frmReservationsEntryIndividual]![txtNameSign] & Chr(13) & Chr(10)
> strBodyText = strBodyText & "Passenger: " &
> [Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName] &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "PAX Phone: " &
> Format([Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerPhone],
> "(000) 000-0000") & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Client:" &
> [Forms]![frmReservationsEntryIndividual]![cboClient].Column(1) & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Contact: " &
> [Forms]![frmReservationsEntryIndividual]![txtContactNameFirst] & " " &
> [Forms]![frmReservationsEntryIndividual]![txtContactNameLast] & Chr(13)
> & Chr(10)
> strBodyText = strBodyText & "Phone: " &
> Format([Forms]![frmReservationsEntryIndividual]![txtContactPhone],
> "(000) 000-0000") & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "From: " &
> [Forms]![frmReservationsEntryIndividual]![cboOrigination] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "To: " &
> [Forms]![frmReservationsEntryIndividual]![cboDestination] & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Fare: " &
> Format([Forms]![frmReservationsEntryIndividual]![curFare], "Currency") &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Vehicle: " &
> [Forms]![frmReservationsEntryIndividual]![cboVehicleType].Column(1) &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Party Size: " &
> [Forms]![frmReservationsEntryIndividual]![intNumberofPassengers] &
> Chr(13) & Chr(10)
> strBodyText = strBodyText & "Car Seat: " &
> [Forms]![frmReservationsEntryIndividual]![cboCarSeat] & Chr(13) & Chr(10)
> strBodyText = strBodyText & "--- --- --- --- ---" & Chr(13) &
> Chr(10)
> strBodyText = strBodyText & "Comments:" & Chr(13) & Chr(10)
> strBodyText = strBodyText &
> [Forms]![frmReservationsEntryIndividual]![txtComments]
>
> strLocation = DLookup("txtLocationShortDescription",
> "tblLocations", "[txtLocationName] =
> [Forms]![frmReservationsEntryIndividual]![cboOrigination]")
> strLocation = strLocation & " - "
> strLocation = strLocation &
> DLookup("txtLocationShortDescription", "tblLocations",
> "[txtLocationName] =
> [Forms]![frmReservationsEntryIndividual]![cboDestination]")
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Updating appointment..."
> [Forms]![frmReservationsEntryIndividual].Repaint
>
> With targetAppointment
> .Start = [Forms]![frmReservationsEntryIndividual]![dteDate]
> & " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
> .End = [Forms]![frmReservationsEntryIndividual]![dteDate] &
> " " & [Forms]![frmReservationsEntryIndividual]![dteTimeScheduled]
> .Subject =
> [Forms]![frmReservationsEntryIndividual]![txtPrimaryPassengerName]
> .Location = strLocation
> .UserProperties(1) =
> [Forms]![frmReservationsEntryIndividual]![lngTransportID]
> .UserProperties(2) = Now
> .UserProperties(3) =
> [Forms]![frmReservationsEntryIndividual]![cboStatus].Column(1)
> .Body = strBodyText
> .BusyStatus = olBusy
> .Categories = "Reservations"
> .Save
> End With
>
> [Forms]![frmReservationsEntryIndividual]![txtAdvisory] =
> "Appointment updated"
> [Forms]![frmReservationsEntryIndividual].Repaint
> DoCmd.Hourglass (False)
>
> MsgBox ("Outlook appointment updated.")
>
> Set targetAppointment = Nothing
> Set targetAppointmentGroup = Nothing
> Set targetCalendar = Nothing
> Set mailbox = Nothing
> Set nms = Nothing
> Set objOutlook = Nothing
> Else
> MsgBox ("An Outlook appointment has not been scheduled for this
> reservation.")
> End If
>
> End Sub
>
>
> JohnR wrote:
> > Yes go to
> > http://support.microsoft.com/?kbid=209963
> > For how
> > "backmanb" <(E-Mail Removed)> wrote in message
> > news:9086F3B1-8675-4FBD-ABBB-(E-Mail Removed)...
> >
> >>Here what I want to do.
> >>
> >>I want to create a basic database, where the user types in the subject in
> >>the subject textbox and then selects a start time, end time and then a
> >>picks
> >>a date. After that the user clicks update and then the database
> >>automatically
> >>updates my outlook calendar with the given information. So my question is,
> >>is
> >>it possible to have Access automaticaly update your outlook calendar with
> >>appointments.

> >
> >
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connectiing to SQL Server from an ADP =?Utf-8?B?R3JlZw==?= Microsoft Access ADP SQL Server 11 14th Nov 2007 08:10 PM
Connectiing to SQL 2005 from ASP Pages Fred Chateau Microsoft ADO .NET 5 10th Nov 2006 10:53 PM
Connectiing to WebService problem =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?= Microsoft Dot NET Framework 2 8th Jan 2006 06:42 AM
DSL not connectiing at DSL-like speed =?Utf-8?B?SmFyZWQgQi4=?= Windows XP Networking 3 11th May 2005 01:45 AM
Connectiing to internet =?Utf-8?B?TWVocmFkLks=?= Windows XP General 0 19th Oct 2004 04:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:07 PM.