hide access environment

?

.

is thre a way to HIDE the msaccess window, and run things from user input
and output forms?

i already have it set so that my database launches a form that covers the
whole screen, but the msaccess window is still available and i dont want the
users getting in trouble by playing with the database controls.
 
T

tina

you can do quite a bit to make your application harder to break - at least
by unskilled or less-skilled users - without hiding the software window. for
instance, i normally set the Startup to disallow built-in toolbars and
menus, disable special keys (like F11 which brings the db window to the
front), and hide the db window; set AllowBypass to false so the user can't
bypass the Startup settings and/or an AutoExec macro; disable the "X" button
on the software window title bar's right side, split my application and
password protect the backend, while distributing the frontend as an mde
file. none of this is impossible to get around, but will prevent users from
simply stumbling into trouble - they'd have to go in and make a determined
(and informed) effort to find it! you can get a lot of ideas from "Real
World Microsoft Access Database Protection and Security" by Garry Robinson.

hth
 
D

Dale Fye

This is the function you are looking for.

http://www.mvps.org/access/api/api0019.htm

Problem is that if you don't have REALLY, REALLY good error handling, your
users could be left with only one way to close their application (the dreaded
Task Manager).

This will actually hide the application window, but in order for it to work,
all of your forms must be popup and modal (or something like that), which
carries with it a couple of other issues. One of the issues with this
technique is that when you hide the Access window, it no longer shows up in
the toolbar at the bottom of the Windows screen. So, if you allow your user
to minimize the application, the only way to get back to it is to use
Alt-Tab.

I've stopped using this in favor of turning off all of the user menu, hiding
the database window (or navpane in 2007), etc. The thing I was always afraid
of when keeping the Access window visible was that the X was always an
option, allowing the user to close Access without properly closing out of the
application. I prevent this from working by adding a little code to each of
my main forms.

1. First, I declare a variable that is Private to each form:
Public AllowClose as boolean

2. Next, in the forms Open event, I set AllowClose to False

3. In the forms unload event, I test to see whether AllowClose has been
reset to true (get to this in a second). If not, I set the Cancel to True
and display a warning message advising the user to close the form with the
"Close" button, or via my "Form" menu.

4. Lastly, I put a "Close" button or my "Form" menu on each of these forms.
In the click event of the "Close" button, I do something like the following:

Private Sub cmd_Close_Click

'add some code here to save or undo the changes to the
'current record

AllowClose = True
docmd.close acform, me.name

end sub

This way, when the user tries tries to close Access using the X (whether
intended or not), the form refuses to close.
--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

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