Pesky Restore Button on Maximized Forms

  • Thread starter Thread starter David Altemir
  • Start date Start date
D

David Altemir

I have been reading these groups and nothing has yet worked for me in
Access 2003. Does anyone what VBA code I need to use to "disable" the
restore button you get in the top right corner of a maximized form in
Access 2003? I just want to prevent users from accessing the backend
of the database.

(The KB work-around is for an earlier version of Access and it didn't
work, at least the way I implemented it)
 
David,
In Tools/Startup de-select Show Database Window. When a user closes a
form, they can't see the Database Window.
That's a good way (of several) of preventing users from seeing your MDB
components.

Also, check out the Min Max property for the form itself. You can
control what Max Min buttons display on the form.
hth
Al Camp
 
Thanks very much for your suggestions!!! I ended up doing
something along the lines of what Al suggested. It's not what I
originally intended but seems to be reasonably effective insofar as
keeping people out of the back-end

This is what I did:

1) In form design, turn OFF the Close button and turn ON the min max
buttons. This means that users will be able to minimize, maximize,
and restore the form's frame.

2) I also made sure that the shortcut menu is set to NO and that
design views are only enabled in Design Mode (under the "Other"
properties tab).

3) Add a "Sys Admin" button to my form that causes a dialog box to
pop up. If you enter a password in the dialog box and press OK, some
VBA code will cause all forms in the application to close. (This will
be your only "trap door" through which to access the back end.

4) Add a custom menu and tool bar to every user form that does not
contain any command you don't want the users to have access to (like
"close", "database properties", design view", etc.)

5) Go to Tools|Startup and hide the database window at startup.

Users will be able to reduce and resize the forms to their heart's
content, but they won't be able to see the tables, queries, etc. in
the database window because it's hidden and they won't be able to
unhide it because they will only have access to some sanitized menu
and tool bar functions. The sys admin can then use the trap door
button to close all the forms, thereby causing the regular "Menu Bar"
to appear that will allow them to unhide the database window.
 
Back
Top