CloseButton 
Author Message
 CloseButton

Hi,

Is it possible to determinie, if the user use the closeButton (x) on a form
to close an form.

Thanks in advance

Mik



Thu, 04 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Mik,
Put code behind the form's Unload event.  You should be able to trap it from
here, and set to Cancel if needed,

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------

:Hi,
:
:Is it possible to determinie, if the user use the closeButton (x) on a form
:to close an form.
:
:Thanks in advance
:
:Mik

:
:



Thu, 04 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Dev,

Thank you for tanking time to answering, but how can I trap this
information.
The for is a menu thats means that I have some code in the CoseEvent, which
comes after the UnloadEvent.

That means if the I have to put some code in the UnloadEvent that will
"disable" all the other events on the form. Do you get the point.

A little extra question

What is wrong with this code:

If CurrentUser = "Supervisor" Then
...then do something
Else
....then do something else
end if

and for the "endding" what a wonderfull place this Dev's World in {*filter*}Space
http://www.*-*-*.com/ ~dashish

Thanks in advance

Mik

Quote:
>Hi Mik,
>Put code behind the form's Unload event.  You should be able to trap it
from
>here, and set to Cancel if needed,



Sun, 07 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Dev,

Thank you for tanking time to answering, but how can I trap this
information.

The form is a menu thats means that I have some code in the CloseEvent,
which
comes after the UnloadEvent.

That means I have to put some code in the UnloadEvent that will
"disable" all the other events on the form. Do you get the point.

A little extra question

What is wrong with this code:

If CurrentUser = "Supervisor" Then
...then do something
Else
....then do something else
end if

and for the "endding" what a wonderfull place this Dev's World in {*filter*}Space
http://www.*-*-*.com/ ~dashish

Thanks in advance

Mik

Quote:
>Hi Mik,
>Put code behind the form's Unload event.  You should be able to trap it
from
>here, and set to Cancel if needed,



Sun, 07 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Dev,

Thank you for tanking time to answering, but how can I trap this
information.
The for is a menu thats means that I have some code in the CoseEvent, which
comes after the UnloadEvent.

That means if the I have to put some code in the UnloadEvent that will
"disable" all the other events on the form. Do you get the point.

A little extra question

What is wrong with this code:

If CurrentUser = "Supervisor" Then
...then do something
Else
....then do something else
end if

and what a wonderfull place this Dev's World in {*filter*}Space
http://www.*-*-*.com/ ~dashish

Thanks in advance

Mik

Quote:
>Hi Mik,
>Put code behind the form's Unload event.  You should be able to trap it
from
>here, and set to Cancel if needed,



Sun, 07 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Dev,

Thank you for tanking time to answering, but how can I trap this
information.
The for is a menu thats means that I have some code in the CoseEvent, which
comes after the UnloadEvent.

That means if the I have to put some code in the UnloadEvent that will
"disable" all the other events on the form. Do you get the point.

A little extra question

What is wrong with this code:

If CurrentUser = "Supervisor" Then
...then do something
Else
....then do something else
end if

and what a wonderfull place this Dev's World in {*filter*}Space
http://www.*-*-*.com/ ~dashish

Thanks in advance

Mik

Quote:
>Hi Mik,
>Put code behind the form's Unload event.  You should be able to trap it
from
>here, and set to Cancel if needed,



Sun, 07 Jan 2001 03:00:00 GMT  
 CloseButton
Hi Mik,

Sorry, I don't think I understand the question.  On the Unload event,  you
can check for circumstances when you want to avoid closing the form.  To
actually prevent it from closing, set Cancel=True.

    Cancel=(Weekday(date)=VbSunday)

This will prevent the form from closing on Sundays :).

If you need to do data validation, form's BeforeUpdate event also gives you
the Cancel method.

For the extra question, no, I don't see anything wrong with the code.

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://www.*-*-*.com/ ~dashish )
---------------

:Hi Dev,
:
:Thank you for tanking time to answering, but how can I trap this
:information.
:
:The form is a menu thats means that I have some code in the CloseEvent,
:which
:comes after the UnloadEvent.
:
:That means I have to put some code in the UnloadEvent that will
:"disable" all the other events on the form. Do you get the point.
:
:A little extra question
:
:What is wrong with this code:
:
:If CurrentUser = "Supervisor" Then
:...then do something
:Else
:....then do something else
:end if
:
:and for the "endding" what a wonderfull place this Dev's World in
{*filter*}Space
: http://www.*-*-*.com/ ~dashish
:
:Thanks in advance
:
:Mik
:
:>Hi Mik,
:>Put code behind the form's Unload event.  You should be able to trap it
:from
:>here, and set to Cancel if needed,
:
:



Sun, 07 Jan 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. need help with CloseButton=false

2. User and CloseButton - RE:

3. CloseButton and User

4. Hide or Disable the closebutton of a Userform

5. Disable closebutton

6. Disable the ControlBox (Window CloseButton)

7. ControlBox (Window CloseButton)

8. Min, Max, and CloseButton question

9. CRViewer CloseButton not enabled ?

 

 
Powered by phpBB® Forum Software