Securing a database using VBA (1 Viewer)

striker

Useless and getting worse
Local time
Today, 19:03
Joined
Apr 4, 2002
Messages
65
I have a number databases for which I am sole administrator, one of them up until recently was read only access to all accept myself. As if by magic ordinary users seem to be able to write to the database although their permissions are set to read only. I have tried setting the permissions through the workgroup but can't seem to get anywhere. It has been suggested to recreate the workgroup but I have over 150 users and this seems a very long winded process.

Are there any access guru's who can provide me with some code that can set a users permissions when the database first opens.

I had thought of using the currentUser property to get the user name and if it isn't mine then to set all objects to read only.

But and its a big but, the help on how to do this in Access97 is almost useless. So anyone willing to offer up an elegant solution or even a working one or even a pointer on where to go from here.

Thanks in advance.
 

Travis

Registered User.
Local time
Today, 11:03
Joined
Dec 17, 1999
Messages
1,332
Does the Admin account still have full permissions?

Are the users being directed to the Correct WorkGroup? (This can be set on the command line). You can also check this using the SysCmd Function.
 

striker

Useless and getting worse
Local time
Today, 19:03
Joined
Apr 4, 2002
Messages
65
Travis,

Strangely Yes on both counts, Ive checked everything and the permissions are as they should be.

I'm still looking for a coded solution.
 

Travis

Registered User.
Local time
Today, 11:03
Joined
Dec 17, 1999
Messages
1,332
What is the name of your MDW file?

If it is SYSTEM.MDW (Which is the Default) it is possible that the users are accessing the MDB by opening Access first and then your MDB File.

One suggestion would be to use a MDE file and not an MDB File.
 

striker

Useless and getting worse
Local time
Today, 19:03
Joined
Apr 4, 2002
Messages
65
Travis,


There is only one mdw file on the network that my users can see anyway. On each NT box there is a batch file that runs at login to delete system.mdw if it exists. This was the only help our IT staff have been able to give us on this problem.

The thought of having to recreate the workgroup for 150 users id filling me with horror and is the stuff of nightmares

Cheers
Steve
 

Users who are viewing this thread

Top Bottom