Scheduling Appointments

  • Thread starter Thread starter Andrew Brule
  • Start date Start date
A

Andrew Brule

What I am looking for is an easy way of setting up a
calendar for booking appointments similar to the Calendar
fuction within Outlook. We have a database the tracks
work orders that we generate here. Now we want to use
this database to say link to five different Outlook
Calendars on a network (we can set up delegate status with
each of the individual staff) so we can book someone to do
the work. Anyone know of a way to do this? Where to get
started? I've loked through the available Access feature
asnd there doesn't seem to be an easy way of linking to a
Calendar in Outlook.


Thanks Andy
 
Hi Andrew
An option in 2002 & 2003 (2000 is a little bit trickier as you will
need to download the actual control from MS) is to use the standard Outlook
dll (the Outlook View Control). You insert the Outlook View Control ActiveX
into a form and all your Outlook folders are there for you to manipulate
including the calendar for appointments.
Here is an example:

These are the steps to create a form with the OVC but please note that this
applies only in 2003 as Outlook in 2000 & 2002 has slightly different views
so the code would need to be changed for the Outlook 2000 & 2002 views (i.e.
the code lines that say Me!ctlView.RowSource = ).

1. Create a new form
2. Add a combo box and
- rename it to cboViewType
- Row Source Type is Value List
- Assuming your Outlook installation's default view is Inbox insert as
the Row Source "Messages";"Messages with AutoPreview";"Unread messages in
this folder";"Sent To";"Message Timeline"
3. Add an option group of 6 buttons containing
- an option value of 1 through to 6
- captions of Email, Calendar, Tasks, Contacts, Notes and Sent
- rename the option group to optOutlookView
4. Add the Outlook View ActiveX control and rename it to ctlOutlookView
5. Add the following code to the AfterUpdate property of the combo box
called cboViewType:
Me!ctlOutlookView.View = Me!cboViewType
6. Add the following code to the OnClick property of the option group called
optOutlookView:
Select Case Me!optView
Case 1
Me!OutlookView.Folder = "Inbox"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Messages';'Messages with AutoPreview';" & _
"'Unread Messages in This Folder';'Sent To';'Message Timeline'"
Me!ctlView = Me!OutlookView.View
Case 2
Me!OutlookView.Folder = "Calendar"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Day/Week/Month';'Day/Week/Month View " & _
"With AutoPreview';'Active Appointments';'Events';'Annual
Events';" & _
"'Recurring Appointments';'By Category'
Me!ctlView = Me!OutlookView.View
Case 3
Me!OutlookView.Folder = "Tasks"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Simple List';'Detailed List';'Active
Tasks';'Next Seven " & _
"Days';'Overdue Tasks';'By Category';'Assignment';'By Person
Responsible';" & _
"'Completed Tasks';'Task Timeline'"
Me!ctlView = Me!OutlookView.View
Case 4
Me!OutlookView.Folder = "Contacts"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Address Cards';'Detailed Address
Cards';'Phone List';" & _
"'By Category';'By Company';'By Location';'By Follow-up Flag'"
Me!ctlView = Me!OutlookView.View
Case 5
Me!OutlookView.Folder = "Notes"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Icons';'Notes List';'Last Seven Days';'By
Category';'By Color'"
Me!ctlView = Me!OutlookView.View
Case 6
Me!OutlookView.Folder = "Sent Items"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Messages';'Messages with AutoPreview';" & _
"'Last Seven Days';'Unread Messages in This Folder';'Sent
To';'Message Timeline'"
Me!ctlView = Me!OutlookView.View
Case 7
Me!subHomeDiscussion.Visible = True
Me!subHomeDiscussion.SetFocus
Me!ctlView.RowSource = ""
Me!ctlView = ""
Me!subHomeDiscussion.Requery
End Select

Use the form by selecting one of the main outlook folders by the option
group buttons and then changing the views by selecting one of the views in
the combo box.

Notes:
1. The views have been taken from the standard Outlook views so the views in
the above code would need to be changed when using Outlook 2000 or 2002
4. An example of how we use this control in an application can be found in
our Jackaroo IT application (Access 2000 and 2002) which can be downloaded
from our web site at http://jackaroo.net.au and selecting Use Outlook on the
User Options form.

The control's help file can be downloaded at
http://www.microsoft.com/downloads/...FamilyID=831F957F-3190-48DA-A099-2BDBC7397623

Hope this helps
 
Thanks Mr Baker, I will try this out. I am not great with
code, is there a way I could do this with macro's and I'm
using 2002 in XP.

Thanks again for the great response.

Andy
-----Original Message-----
Hi Andrew
An option in 2002 & 2003 (2000 is a little bit trickier as you will
need to download the actual control from MS) is to use the standard Outlook
dll (the Outlook View Control). You insert the Outlook View Control ActiveX
into a form and all your Outlook folders are there for you to manipulate
including the calendar for appointments.
Here is an example:

These are the steps to create a form with the OVC but please note that this
applies only in 2003 as Outlook in 2000 & 2002 has slightly different views
so the code would need to be changed for the Outlook 2000 & 2002 views (i.e.
the code lines that say Me!ctlView.RowSource = ).

1. Create a new form
2. Add a combo box and
- rename it to cboViewType
- Row Source Type is Value List
- Assuming your Outlook installation's default view is Inbox insert as
the Row Source "Messages";"Messages with
AutoPreview";"Unread messages in
this folder";"Sent To";"Message Timeline"
3. Add an option group of 6 buttons containing
- an option value of 1 through to 6
- captions of Email, Calendar, Tasks, Contacts, Notes and Sent
- rename the option group to optOutlookView
4. Add the Outlook View ActiveX control and rename it to ctlOutlookView
5. Add the following code to the AfterUpdate property of the combo box
called cboViewType:
Me!ctlOutlookView.View = Me!cboViewType
6. Add the following code to the OnClick property of the option group called
optOutlookView:
Select Case Me!optView
Case 1
Me!OutlookView.Folder = "Inbox"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Messages';'Messages with AutoPreview';" & _
"'Unread Messages in This Folder';'Sent To';'Message Timeline'"
Me!ctlView = Me!OutlookView.View
Case 2
Me!OutlookView.Folder = "Calendar"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource
= "'Day/Week/Month';'Day/Week/Month View " & _
"With AutoPreview';'Active Appointments';'Events';'Annual
Events';" & _
"'Recurring Appointments';'By Category'
Me!ctlView = Me!OutlookView.View
Case 3
Me!OutlookView.Folder = "Tasks"
Me!OutlookView.SetFocus
Me!subHomeDiscussion.Visible = False
Me!ctlView.RowSource = "'Simple List';'Detailed List';'Active
Tasks';'Next Seven " & _
"Days';'Overdue Tasks';'By
Category';'Assignment';'By Person
 
Mr Baker:

I followed your example but could not get it to run. Could you offer some
additional assistance on this subject as it is something we are looking to
do also.

Chuck Walker
(e-mail address removed)
 
Hi Chuck
I have just emailed to you a database that has 1 form that contains a
working copy of using the OVC for you to see how. I know it works but if you
have any problems or are using Access 2000 or 2002 then please feel free to
let me know.

Hope it helps
 
Also Chuck
Other bits of useful code is: (if the OVC is named OutlookView)
To force a send and receive:
Me!OutlookView.SendAndReceive
To create a new item of the currently selected Outlook folder
Me!OutlookView.NewDefaultItem
or for specific new items you could use
Me!OutlookView.NewMessage()
Me!OutlookView.NewAppointment()
Me!OutlookView.Contact()
Me!OutlookView.NewTask()
Me!OutlookView.NewNote()

Downloading the OVC help file at:
http://www.microsoft.com/downloads/...FamilyID=831F957F-3190-48DA-A099-2BDBC7397623
Contains lots of different methods and properties that you can use to
manipulate Outlook instead of the usual Outlook automation method of
creating an instance etc.
 
Back
Top