Help with Creating Outlook AppointmentItems via Access

  • Thread starter Thread starter David C. Holley
  • Start date Start date
D

David C. Holley

I've written a VBA code which sucessifully creates an Outlook
AppointmentItem from information on an Access form. I'm having problems
though with figuring out WHEN to trigger the code. Specifically, I'm
collecting data using a mainForm & subForm.

When should I trigger the code so that the code runs only once? (As
opposed to running multiple times when moving between & updating the
mainform & subform.)
 
Hi David,

How about "in the Click event procedure of a Save button"? Or would the
AfterUpdate event of the main form do the job?
 
The AfterUpdate event appears to be firing once focus is moved to the
subform. This is fine, however information from the subform still needs
to be sent to Outlook which means that the code runs twice - once when
focus shifts, once when focus moves out of the subform. The idea to
AUTOMATICALLY interface with Outlook once. There is no SAVE button since
I count on updates being committed when the user moves to a new record.

I already have a lastMod field and am thinking about a
OutlookAppointmentLastMod field. From this, I may do something where the
Outook code is triggered based on the two values. I want to do this to
document wether or not Outlook is current which might help in solving
the original problem.

David H
 
Back
Top