quiting the application when form close button pressed

303factory

Registered User.
Local time
Today, 20:26
Joined
Oct 10, 2008
Messages
136
Hi

My application has many forms that close and load when you press 'continue' or 'back' buttons etc.

Each form has the close button in the top right but when you pressed the access application stays open. I need a way to trigger the 'Application.Quit' when they press the form close button, but not when the form is closed by any other means.

I tried the Form_close event but thats no good in this case.

Any ideas?

Thanks!
303
 
What you need to do is to disable the Min max close buttons on the form then generate a button to close the application (there is a button wizard that will help you)
 
Setting Application.Quit in the closing event sholud work fine as do docmd.quit.

I tried the Form_close event but thats no good in this case.

Why is it no good? I tested it and the only problem is that you get an error when going to design view. You could try an make a button to close and put the Quit command there and remove the normal closebutton on the form.

JR
 
Setting Application.Quit in the closing event sholud work fine as do docmd.quit.



Why is it no good? I tested it and the only problem is that you get an error when going to design view. You could try an make a button to close and put the Quit command there and remove the normal closebutton on the form.

JR

Because the forms close and open all the time as my application runs normally. I dont want the application to quit every time one form closes and another one opens.

If there's no way to put any code behind the close button I may have to create my own close button as suggested above.
 

Users who are viewing this thread

Back
Top Bottom