Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Protection 1

Status
Not open for further replies.

RemyS

Technical User
Jul 3, 2001
100
GB
Hi everyone,

I've recently gotten into the development game, and am almost entirely self taught, with only a few, very informative, tutor sessions, as formal training.

I usually manage to do whatever is required (I love that fact that there are so many ways of doing any one thing in VBA, and so many ways to search the 'Help' files), which leads me to my scenario;


I currently use the Access 97 Startup options from Tools to restrict the majority of access to toolbars and menus, though I've not currently attempted to set any security to the database, and I don't want users to have to type in a userID & password, nor do I understand much about MDEs. The file currently resides on a shared drive, and is used by up to 6 people at a time.

What I'd like to know is which would be the best way of protecting the structure of the database?
I do know that is it possible to code restrictions, but not sure how.

All sugestions and recomendations apreciated

Rémy
 
Well, I basically use 2 different methods to restrict access to databases. If your users don't know too much about databases (i.e. They don't know about the "shift trick" or F11) then you can lock them out by setting the following options on the startup menu.

1. Set a form to display at startup
2. Uncheck "allow full menus", "Allow built in toolbars", "Allow toolbar/menu changes", "Display database window".

After doing this, the only way back into the design of your database will be to "shift" into it. (Hold down shift key while opening)


If your users know about the shift key, then the best solution is to make an MDE file. There really isn't much to it. Just go to tools---> database utilities ---> make MDE. This will make an executable copy of your database which you can distribute to the users. They could still mess with your queries and tables, but they are locked out of the design of any other objects.

Just be sure to keep a copy of the mdb on your computer!!!
 
The code below will allow you to turn off the shift key work around... If you run the code with "false" instead of "True". If you want to re-enable the shift key work around just re-run the code with "false"

Function PreventBypass() As Boolean
'Dim prp As Property

'Set prp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, True, True)
'CurrentDb.Properties.Append prp

'Set prp = Nothing
CurrentDb.Properties("AllowBypassKey") = false
End Function

' The only thing you have to modify is
'CurrentDb.Properties("AllowBypassKey") = false or true
 
Pcdaveh, do you know of a way to also disable F11?
 
hi,

in the "advanced" tab of the startup options, just check out access special keys.

grtz

cpuburn

 
Thank you, thank you, thank you. I've been looking for a way to disable the F11 ever since I found out about it!
 
Thanks for the tips guys - I'll look into MDEs a bit more.

I already switch pretty much everything off in the Startup option (including advanced)

I didn't even know about F11 until now.

I'm not too confident about coding out the Shift key, as that's how I currently get into my development version of the DB myself - d'oh!
 
Remy, take a look at this FAQ. It helped me out with the shift key issue. faq181-143 B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top