prevent saving when just closing



Hi,

I would like my record to be saved only when my own close button (with all it's checks) is used.
I made the winodws close button disappear, but you still can close using the right mouse click.
also when designing, going to design mode saves the record.

So I tried: OnClose : Me.Undo.
My own cancel button uses it and it works ok,
but not in the OnClose event.

how to prevent the record to be saved when just closing.

I hope I could make myself clear...

TIA

Michiel

.



Relevant Pages

  • Re: prevent saving when just closing
    ... I made the winodws close button disappear, but you still can close using the ... going to design mode saves the record. ... My own cancel button uses it and it works ok, ... but not in the OnClose event. ...
    (comp.databases.ms-access)
  • Re: Form disappears
    ... What code to you have behind the Form's OnClose event? ... Sounds like you have a Quit command in there, ... into Design mode from an open form triggers the OnClose event. ... > kicks me totally out of Access. ...
    (microsoft.public.access.forms)
  • Re: prevent saving when just closing
    ... In that event the info on the form will be wiped away, unless a Boolean is set to True by my own Close button. ... going to design mode saves the record. ... but not in the OnClose event. ...
    (comp.databases.ms-access)
  • Re: prevent saving when just closing
    ... but I continue experimenting. ... The matter is that someone is allowed to close the form, ... going to design mode saves the record. ... but not in the OnClose event. ...
    (comp.databases.ms-access)
  • Re: Every once in a while a usercontrol will disappear from the form
    ... > Every once in a while it will disappear from the form but the statement ... > Friend WithEvents ControlText1... ... Control_Load that in design mode didn't exist. ...
    (microsoft.public.dotnet.languages.vb)