How to know if a Form.Close Event is the result of canceling

E

escamoteur

Hi,

I would like to know how can I detect it a user clicked the close button on the titlebar or if the inspector was closed after it's
item was saved. Unfortunately the Close-Events do not provide any information why they are fired.

I use Outlook2007
Best
Tom
 
K

Ken Slovak - [MVP - Outlook]

Handle the Write() event, which fires when an item is saved. You can also
check the Saved status of the item.
 
E

escamoteur

My problem is that I have some fields that have to be saved too but that are not mapped to any Item Fields. if only they are changed
I don't get a WriteEvent when closing an item. Also the Saved Status does not change if only one of the unbound Controls have
changed.
Unfortunately it seems that the "Saved" status is read only so you can't mark an item as "unsaved".

I know use a crued work arround. As soon as a control changes that should also set the Item in "unsaved" state I know write to not
used Datafield of the item ans I restore the original value a moment later.
So even if none of the bound controls don't change I can use the"Write Event" to store my unbound data if it was modified.

Best
Tom
 
K

Ken Slovak - [MVP - Outlook]

Why are you using unbound controls at all? Bind the controls to some fields
and get rid of the problem.
 

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