Question Disable a command button based on the security group

eddyfuente

New member
Local time
Today, 02:17
Joined
Dec 15, 2009
Messages
9
Hi All,
Newbie in a little predicament here and could really use some assistance. I created a small database to keep track of everyone’s time off requests and it has slowly grown to include approval time stamps by different levels of management.

The time stamp(s) are created via a command button(s) on the form and are working fine.

The only problem I have is that any user can approve a record. I used the wizard to create user-level security but am stumped how to disable a button on a form based on the security group. Any help would be greatly appreciated.

Thanks in Advance,
Eddy
 
I don't use the security groups in Access but keep a table of security levels by user. (I just use the Windows login to determine the current user.) I guess a similar system could be employed with the Security Groups.

Where some features on a form are only to be available to those above a certain level I set a value in the Tag property of the control and the Visible property to No.

Then in the On Load event of the form I loop through the controls and compare the control's Tag security level with the user's security level and only make it visible (or enabled if you like) where the User security is higher than the tag security level.
 

Users who are viewing this thread

Back
Top Bottom