473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

preventing form to close

Sam
Hi,
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?

Thx

Nov 21 '05 #1
4 1137
Sam
ha... i've found it. Cancel property of the canceleventargs....

Nov 21 '05 #2
Sam
ha... i've found it. Cancel property of the canceleventargs....

Nov 21 '05 #3
"Sam" <sa**************@voila.fr> schrieb:
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?


Set 'e.Cancel = True' in the event handler.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Sam" <sa**************@voila.fr> schrieb:
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?


Set 'e.Cancel = True' in the event handler.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Baz'noid | last post by:
Hi all, As the size of my database and the number of users grows, i've found a horrible bug in the system with a very simple solution (but i don't know how to implement it)... If two people...
5
by: Iain | last post by:
I would like to prevent the user from closing MDI child windows. However, I would like them to be able to minimize and maximize them. Setting the Control Box to false removes the minimize and...
13
by: M O J O | last post by:
Hi, I need to create a popup form what will not steal focus. I've searched the net and I managed to put some code together. Below is the result of my code, but I have a single question .......
0
by: Sam | last post by:
Hi, Once the user has clicked on the close button of my MDI form I do error checking in the Closing event if errors have been found the form should not be closed. How can I prevent the form to be...
4
by: microb0x | last post by:
I have an application with a master form with a tab control containing nine tabs, each tab contains a subform. I have command buttons on my main form including: Save , Cancel , Close. My...
3
by: sravan_reddy001 | last post by:
i want to prevent a form from closing.. to do this i want to handle the formClosing or FormClosed events. from here i want to prevent the form from closing. New instance of same form should...
8
by: mark_aok | last post by:
Hi all, I have a split database. Both the forms, and the tables are stored on a shared network drive (this is Access 2003). The users use the forms, and the tables on the network drive, there...
1
by: mcleod1517 | last post by:
I am changing the FILTER, ORDERBY, and ORDERBYON attributes of an Access 2007 form. I have code tied to buttons on the form that resort and/or refilter the records of a datasource based on user...
0
by: Susan Bricker | last post by:
Hi. I have a form that is open with AllowAdditions and AllowEdits both set to False. I don't want to allow edits on this screen at this point in the "flow". Opening up a second form seems to be...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.