Provided by berlinda b eras, 14-Nov-95
In conjunction with using security work groups to limit/permit functionality to individual users, controls may be enabled/ disabled at run time. Otherwise users will have to view a warning message box from Access, when they try to do something they're not allowed to do.
Note that the permission assignments for workgroups are by table, query, form, macro, etc. So this type of routine must be used to 'set - permissions' for individual controls. As in the example below, "viewers" must have permission to see the mainswitch board form, but it is necessary to disable buttons on that form.
To do this:
For example:
if condition: [Forms]![usersform]![workgroup]="viewers" setvalue: [Forms]![mainswitch]![reportsbutton].[Enabled] Yes [Forms]![mainswitch]![addbutton].[Enabled] No [Forms]![mainswitch]![editbutton].[Enabled] No
This will 'gray-out' and disable the add and edit buttons.
This tip was supplied by berlinda b eras, 14-Nov-95.
Home | Index of tips | Top |