Lock down Database

durdle

Registered User.
Local time
Today, 23:47
Joined
May 7, 2002
Messages
130
Hey,

Just want to know how lock down Access. I don't want the user to be able to Right Click of the form to go to design mode, don't want the user to be able to view the "Database Window" and want the user to be able to close down access by click button the the form.

Any advice?

durdle
________
volcano digital vaporizer
 
Last edited:
this will only "Lock down access" to the average user

If you go to tools,select startup, there you can select what form
to show on start up,whether to show database window etc

if you want to stop the right click etc
set the forms shortcut menu property to no

However this wont stop any one but the average user

perhaps you should consider giving your user a mde file instead.

That will a least Stop them from viewing or changing any design
work.

To shut down access on a button click
use that buttons on click event and insert this code

application.quit

hope that helps
 
You need to sucure your db if you want to keep the riff-raff out of your db. Here are some tricks I use when security is not the best option for a given situation...

The below code will disable (hide) all menu bars and tool bars. Ensure that you have a way to enable (unhide) the menu bars and tool bars (transparent command button) before you hide them!

'this will disable all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

'this will enable all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
Next i

An added bonus is the right click option is disabled if the menu bars are disabled with the above code.

Use the 'ShowToolbar' command if you need to display a toolbar...
DoCmd.ShowToolbar "YourToolBarNameHere", acToolbarYes

This will hide a toolbar when needed...
DoCmd.ShowToolbar "YourToolBarNameHere", acToolbarNo

You can also hide/unhide the database window with code...

'Hide the database window
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide

'Unhide the database window
DoCmd.SelectObject acTable, , True

Check out this thread for the code to disable the applcaitons close "X" button...

Disable the 'X' that allows a user to close your db

HTH
 

Users who are viewing this thread

Back
Top Bottom