PC Review


Reply
Thread Tools Rate Thread

Disable Access 2007 close button at upper right corner

 
 
Song Su
Guest
Posts: n/a
 
      4th Sep 2008
How to do that? Thanks.


 
Reply With Quote
 
 
 
 
Song Su
Guest
Posts: n/a
 
      7th Sep 2008
I need more guidance.

I want people only quit the application from my main form which as a quit
button. I don't want people to click Access close button while other
forms/reports open.

Do I put unload event on all the forms or just my main form? What's the
'test' should be?

Thanks.

"ErezM via AccessMonster.com" <u45095@uwe> wrote in message
news:89ce4f8528469@uwe...
> hi
> you need to have a form open.
> then use that form's UnLoad event to check if you want the application
> closed
> or not, if you cancel the unload event, the form cannot close and access
> will
> have to stay open.
> like
> Private Sub Form_Unload(Cancel As Integer)
> If [put your test here] Then Cancel = 1 (any value other than 0 will
> cancel
> the unloading of the form and therefore the closing of access)
> End Sub
>
> good luck
> Erez.
>
> Song Su wrote:
>>How to do that? Thanks.

>
> --
> May all beings be happy.
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200809/1
>



 
Reply With Quote
 
Song Su
Guest
Posts: n/a
 
      7th Sep 2008
Works great! Thank a lot!

"ErezM via AccessMonster.com" <u45095@uwe> wrote in message
news:89d699abf5fea@uwe...
> hello again
> inside a global module, create a
> "Dim ExitOK As Boolean"
>
> when the main form opens set this variable to false
> "ExitOK=False"
>
> in the Quit button you have, add this line
> "ExitOK=True"
>
> then, in the unload event check
> If Not ExitOK Then Cancel=1
>
> because only the quit button sets this variable to true, any other attempt
> to
> close the form will fail.
>
> Good luck
> Erez
>
> if it's important that no form will close (all open forms will stay open),
> use this technique on every form seperately (but with a different
> variable)
>
> Song Su wrote:
>>I need more guidance.
>>
>>I want people only quit the application from my main form which as a quit
>>button. I don't want people to click Access close button while other
>>forms/reports open.
>>
>>Do I put unload event on all the forms or just my main form? What's the
>>'test' should be?
>>
>>Thanks.
>>
>>> hi
>>> you need to have a form open.

>>[quoted text clipped - 14 lines]
>>>
>>>>How to do that? Thanks.

>
> --
> May all beings be happy.
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200809/1
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable or remove the close button in Access 2007 Mr B Microsoft Access VBA Modules 2 26th Dec 2008 02:14 PM
close button upper right corner (X) =?Utf-8?B?Sm9zZSBQZXJkaWdhbw==?= Microsoft Access VBA Modules 9 18th Oct 2007 08:50 PM
Close Button "X" on upper right hand corner of form =?Utf-8?B?TWFjTnV0MjAwNA==?= Microsoft Access Forms 2 17th May 2007 02:23 PM
Disable close button in Access 2007 =?Utf-8?B?bWFyaWE=?= Microsoft Access 0 8th Mar 2007 09:40 PM
program the close Access button on the upper right hand corner of the screen Philip Leduc Microsoft Access 2 15th May 2006 04:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:30 PM.