New twist on preventing closure by clicking the 'X'

T

Todd K.

I don't mind users closing Access by using the big red 'X', but I don't want
them to be able to close individual forms by using the little black 'X'. I
once saw a database where if you clicked that 'X' on any form, the whole
database closed down. The only way to get to the 'guts' of the database was
to hold down the <Shift> key while opening, how do I get mine to do that?
 
S

Scott McDaniel

Todd K. said:
I don't mind users closing Access by using the big red 'X', but I don't
want
them to be able to close individual forms by using the little black 'X'.
I
once saw a database where if you clicked that 'X' on any form, the whole
database closed down. The only way to get to the 'guts' of the database
was
to hold down the <Shift> key while opening, how do I get mine to do that?

You can do this by setting various Startup options (Tools - Startup) ... for
example, you'd uncheck the Show Database Window option to NOT show the
forms/reports etc listing. Of course, you must then provide a menuing system
for your users for them to navigate through your app.

Only way I know to cause the db to shut down when a form is closed is to
issue a DoCmd.Quit or similar command in the form's Close event (or other
similar event). Also, you can provide code in the form's Close event to take
the user where you want ... for example, if you have a main Menu form, then
perhaps you could throw the user to the Main Menu when they close certain
forms ...
 
T

Todd K.

The setting works great, when the 'X' is clicked you can't see anything. Now
how do I see it when I need to make changes? I tried the <Shift> key open,
but I still can't see the forms.
 
S

Scott McDaniel

Todd K. said:
The setting works great, when the 'X' is clicked you can't see anything.
Now
how do I see it when I need to make changes? I tried the <Shift> key
open,
but I still can't see the forms.

You'd need to re-enable the "See Database Window" option, then close and
re-open the database, or re-enable the shift key bypass and then close and
re-open the database with the shift key held down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top