SQL 2k Access 2k3 - integrate Roles with Forms (1 Viewer)

ozinm

Human Coffee Siphon
Local time
Today, 23:01
Joined
Jul 10, 2003
Messages
121
Hi all,
before i start recreating the wheel, could anyone give me any pointers in getting Access to block users from launching particular Forms based on which roles they are members of in SQL.

I am using Access 2003, with SQL 2000 in NT Authentication mode.
The forms are located in an Access Project (.adp) I am in the middle of writing.


Thanks in advance for any help & suggestions.

M.
 

ozinm

Human Coffee Siphon
Local time
Today, 23:01
Joined
Jul 10, 2003
Messages
121
OK,
here's what I'm thinking - please critque :

I set up a table which is publicly accessable storing the following data:
Form Name : Varchar
Object Name (null allowed) : Varchar
Role: Varchar
Access : bit (0: Deny, 1:Grant)


By default I want roles will have access to all forms.
Using the table particular roles can be denied access to particular forms or objects within them.
As users could be members of many roles some roles would specificly have to be granted access to a form or objects within incase they are denied access somewhere else.

SO,
I will write a lump of code to see if there are any denies for anything a user is trying to access, and hide those objects or forms unless they have also been given Grant rights as well.

How does this sound to you?
 
Last edited:

Big2

Registered User.
Local time
Today, 23:01
Joined
Oct 6, 2005
Messages
43
You could possibly do it that way, but the normal is to have each member have a UserType ID (numeric) and then relate that ID to a table that has a list of all user types, then you dont have to stick to allowed and not allowed. If your program develops then you may want more than 2 user types and allow access to different forms etc all over your database.

UserType 1 could be Admin and has access to everything etc etc
 

Users who are viewing this thread

Top Bottom