?
Solved

Write from Outlook Calendar to Access Database

Posted on 2012-12-28
6
Medium Priority
?
378 Views
Last Modified: 2013-01-02
We have an application that dymaically writes from an Access Database to a Shared Public Exchange Calendar.  When a user changes a date in the Database, it automatically adds, deletes or moves the item on this public calendar.

Now the users want to be able to move one of the items on the OUtlook Calendar and have it change the date in the Access Database.  

How can I do this?  I do have unique data that I link the field with the OUtlook object, so that isn't a problem.  I just don't know in Outlook VBA how to tell it to look at a Calendar entry and when it changes to do something.

Cheers for any guidance!
0
Comment
Question by:sharpapproach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727413
Have you considered 'Linking' the Outlook data into Access?

Last time I checked, changes worked from both ways...
0
 

Author Comment

by:sharpapproach
ID: 38727723
That feature just creates a linked table.  We have our database that as users add and move things in different tables/fields, etc, then the Calendar updates.  

However, now the users to go the other way.

I have a public calendar called "Study Schedule", and when a user moves an item from one date to another, I have to have it go change some things in access.

I can't figure out how to know in Outlook VBA that a Public Calendar item has been moved/deleted/edited, etc.

If I can figure that out, I should be good to go.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727787
Then this seems to be more complex than I had originally thought...

Please wait for other Experts to reply
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Accepted Solution

by:
sharpapproach earned 0 total points
ID: 38727824
After 2 hours of trying things , I figured it out... Add this code to the ThisOutlookSession Code:

Dim WithEvents m_objAppt As Outlook.AppointmentItem

Private Sub Application_ItemLoad(ByVal Item As Object)
    On Error Resume Next
    Dim strClass As String
    Select Case Item.Class
        Case olAppointment
            Set m_objAppt = Item
      End Select
End Sub

Private Sub m_objAppt_Open(Cancel As Boolean)
    'Put code here for opening
    'for example, to look at the subject
    '.m_objAppt.Subject
End Sub

Private Sub m_objAppt_Read()
    'put read code here.
End Sub

Private Sub m_objAppt_Unload()
    'don't put code here because object model won't see it.
   ' Set m_objAppt = Nothing
End Sub
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727879
Great,
Congrats on getting it working, and thanks for sharing the solution with the community.
;-)

Jeff
0
 

Author Closing Comment

by:sharpapproach
ID: 38736031
Figured it out myself and posted code for future users
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
Six Sigma Control Plans
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question