Help with Creating Outlook AppointmentItems via Access

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.)
 
J

John Nurick

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?
 
D

David C. Holley

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
 

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