Disable access to design view with VBA code

Rob500

Registered User.
Local time
Today, 23:19
Joined
Mar 19, 2007
Messages
10
Hi there

Basically, I have a global variable and when that is true, then the user has administrative privilages and is able to access the whole database. I have coded it such that when this boolean is not true, the user only has limited privilages. This is controlled by a boolean flag for each user.

My question is: is it possible to write a line of code that disables access to design view for each of the users that do not have administrative privilages?

I have it working for command buttons/text boxes etc i.e. disable delete buttons if the user is not an admin, but I'm unsure about access components like design view.

Cheers.
 
Rob,

i guess one solution would be to make a .mde out of the database, giving all the functionality yet no access to change form designs etc. You then keep a back up in a shared secure area if need be.

A solution i have used is a front end back end setup where by the front is .mde, and distrubuted to the users for local storage, yet linked through to a networked back end.

anyone else?
 
if you use security users will have to log in

you can then test which user is logged in, and either disable/enable database properties that would enable certain groups (or even certain users) to access certain design objects.

its complex though
 
gemma, is that the workgroup security? i have always had problems as it needs to be set at individual workstations, doesn't it?
 
workgroup security

it isnt quite that

you set up user groups and add users to those groups - users can be in more than 1 group, and can do whatever any of those groups permit them to do.

you then set privilieges against oyur forms/reports.queries etc

these privileges and user groupos work together to determine what a user can do.

in earlier access versions, this process created a file called workgroup.mdw, whioch each user had to connect to in order to access the dbs. I am not sure if later verisons do exactly the same thing

(in fact there is a default mdw file, called system.mdw that all databases use - its just that, that mdw file doesnt restrict access to anything.)

having said that using workgroups needs some care, and of itslef, these still dont restrict access to forms design etc
 

Users who are viewing this thread

Back
Top Bottom