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

  • Thread starter Thread starter escamoteur
  • Start date Start date
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
 
Handle the Write() event, which fires when an item is saved. You can also
check the Saved status of the item.
 
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
 
Why are you using unbound controls at all? Bind the controls to some fields
and get rid of the problem.
 
Back
Top