By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,508 Members | 2,849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,508 IT Pros & Developers. It's quick & easy.

'X' button on the form top right

P: n/a
Hi all,
When iam clicking 'X' option it is asking a popup to save or No. I am
selecting "No" (Since I dont want to save) But i want it not tosave
without prompting. For this
the following code i have placed click event of a command button.
docmd.clse me,,acSaveNo

But how can i use the save effect when user press 'X' button on top
right window. I tried to place the same code in
form_unload,form_deactiveate events but still it is prompting... Any
window api is there or any event that will fire immediatly ..when we
press 'x' button ..?

Kishore K

Jan 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This only deals with saving design changes. Are you frequently changing the
design of the form and wanting to not save the changes? If you intend this
to save or not save a record, this won't do that for you.

--
Wayne Morgan
MS Access MVP
"K.Kishore" <ki*************@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi all,
When iam clicking 'X' option it is asking a popup to save or No. I am
selecting "No" (Since I dont want to save) But i want it not tosave
without prompting. For this
the following code i have placed click event of a command button.
docmd.clse me,,acSaveNo

But how can i use the save effect when user press 'X' button on top
right window. I tried to place the same code in
form_unload,form_deactiveate events but still it is prompting... Any
window api is there or any event that will fire immediatly ..when we
press 'x' button ..?

Kishore K

Jan 16 '06 #2

P: n/a
Yes. It will frequently changes the design and i dont want to save.
Actually In a static form i am creating a dynamic form using
createform() and creating some controls on it according to user
requirements on static form. so it will create each time a new form
called 'Form1:Form' and doing some task. So frequently it will change.
After this if user wants close the dynamic form without closing, for
this i have coded in on command button click event in dynamic form like

Docmd.Close me.form ,,acSaveNo

So whenever user clicks on this command button form will close without
prompting. So doing fine.
But Suppose if any body clicks on 'x' button on top right corner then
it will prompt for saving. This i want to override with any event. Any
way to supress this prompting..?
But i dont want to disable the button insted need to close the form
without promptiong if we clickes on 'X'.

Jan 16 '06 #3

P: n/a
I don't know of a way to do that without disabling the button. There is
probably a way to hook into the API to disable the warning, but I don't know
what it would be.

--
Wayne Morgan
MS Access MVP
"K.Kishore" <ki*************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Yes. It will frequently changes the design and i dont want to save.
Actually In a static form i am creating a dynamic form using
createform() and creating some controls on it according to user
requirements on static form. so it will create each time a new form
called 'Form1:Form' and doing some task. So frequently it will change.
After this if user wants close the dynamic form without closing, for
this i have coded in on command button click event in dynamic form like

Docmd.Close me.form ,,acSaveNo

So whenever user clicks on this command button form will close without
prompting. So doing fine.
But Suppose if any body clicks on 'x' button on top right corner then
it will prompt for saving. This i want to override with any event. Any
way to supress this prompting..?
But i dont want to disable the button insted need to close the form
without promptiong if we clickes on 'X'.

Jan 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.