473,513 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'X' button on the form top right

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
3 2319
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5884
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
5
73179
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
1
3622
by: RUIZCJ | last post by:
Hi, I'm at my wits end!!! I have the following code. The submit button works on my home computer but when I copy the dll and the ASPX file to my host provider, the button does NOT fire. TIA...
1
1955
by: Sender | last post by:
I have created a form wherein just a button is inserted which when clicked would open a context Menu. So the complete form is just of the size of a buton (just like START button of Windows) Can I...
18
2930
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
7
1294
by: =?Utf-8?B?QW50?= | last post by:
Hi, If I place a button on either a Web form or an HTML form, when I run the page in a browser, the button stretches right across the screen. This happens with our Enterprise Visual Studio at work...
2
3351
by: Bruce | last post by:
Hello, I have a form in an Access 2003 application which opens maximized. Its CloseButton property is set to false. On this form I have a command button that opens a report in preview mode. ...
0
2235
by: JRough | last post by:
Hi, I have a page with a form that is included into a php page. It has some php variables which are headers based on the user choices. In the form I will send some mysql data columns but right...
1
2881
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are...
8
4729
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.