Link to home
Start Free TrialLog in
Avatar of mranders
mranders

asked on

Simple way of preventing changes to anything else than form data in Access 2003

How can I lock down my Access 2003 database so that users can only use my forms to enter and change data? It is a small database on a shared drive with less than 10 users total in an intranet setting.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mranders
mranders

ASKER

Excellent!! - I was able to lock it down using the startup dialog.

This is what I would like to do now:
1) Place it on a shared network volume and have users enter data.
2) Be able to open up the database and make some changes to it (even though I locked it down as much as possible using the startup dialog.

The above comment was to Peter. Sorry tbsgadi I didn't see your comment until now.
tsbgadi, I can't read the page, IE6 just crashes, sorry.
Bear in mind that you can stop the startup form from displaying by holding down the shift key.  To prevent this, you have to disallow the by-pass key:

    CurrentDb.Properties.Append CurrentDb.CreateProperty("AllowByPasskey", dbBoolean, False)

But don't do this for your development database!
Peter if I login to the database with the shift-key pressed all the toolbars etc comes back. So what I plan to do now is to publish my database using the lockdown procedure that you suggested and the shift-key routine to override it. Any last thoughts on this before I give you the points? I haven't shared it before, is there something I should think about?  (I don't worry so much about datatheft etc., I just want ithe DB to be working/stable).
Just so you know how, if you need to re-enable the by-pass key you have to do this via a DIFFERENT database:

    DBEngine.Workspaces(0).OpenDatabase("C:\Temp\YourDatabase.mdb").Properties.Delete "AllowByPassKey"
JezWalter, sorry didn't see your comment before posting my own. Interesting! In my case I don't think I need this kind of security (disabling the shift key routine),  because we are a small team using the DB in an intranet environment, although I can see how it could be really useful in other cases. Also, if I followed your suggestion how would I be able to make changes to the DB?
Is there a way that I can give more points to people than that 500 hundred. I feel like this is so valuable to me, lots of good comments.
As peter57r has already suggested, it's well worth creating an MDE so that the form/report/module designs are inaccessible.
I haven't actually asked a question myself for a very long time, but there certainly used to be a button to increase the number of points somewhere!
500 points is the max.  There is no way past that.  I'm happy if you share the points as you see fit.
Oh, I forgot to say you need to add a reference to the Microsoft DAO Object Library (if you haven't got this already) before enabling/disabling the by-pass key!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sonchoy's suggestion is a great idea, but using MDEs is (debateably) preferable - you get smaller files too!
JezWalters, if I use the MDE option how can I make changes to the code - bug fixes etc.
sonchoy, 'lock project from viewing', I didn't know you could do this - interesting.
The idea with MDEs is that you have two files - an MDB for developers and an MDE for users (which is converted from the MDB just prior to release).

See what I mean?
JezWalters, I can see how it could be a good idea to make the MDB and MDE split in other scenarios.
But I don't think it would work for me since I need to be able to make ongoing fixes during the evenings when no one is using the database.
The whole idea with MDEs is to separate the development database from the database which you distribute to your users.

If you went this route, you'd be able to make changes 'off-line' to the MDB during the day and convert this to MDE ready to 'upload' in the evening.
JezWalters Ok I see, interesting. I think it sounds great.
Could you say something about how the data is handled in this process?
For example, when users enter new data during the day, how is that data retained when I upload a new MDE at night?
MDEs will really only work if you've got a front-end/back-end split, using linked tables.

Is this what you have?
No, we are only a handful of people using this small database in an intranet setting where everyone has the Access 2003 installed etc so we went for a shared db without split.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok I kind of want to avoid that complexity for now Walters.
Although we might do something like that later.
For now I am opting for Peter's + Sonchoy's suggestions.
I will configure the startup options and perhaps lock the vba code in the editor.

 
Just don't forget the password!  :-)