O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

F.4. Group or User SetPermissions Method Options

The SetPermssions method of both the Group and User objects allows you to specify the permissions a group or user has to a database object. As noted in Chapter 7, these method options are specific to MDB database files only. SetPermissions() has no effect on the Access 2007 file format (ACCDB database files).

F.4.1. ObjectTypeEnum Members

The ObjectType option specifies the type of object to which the permission will be applied.

MemberValueDescription
adPermObjColumn2A Column object.
adPermObjDatabase3A Database object.
adPermObjProcedure4A Procedure object.
adPermObjProviderSpecific−1The object type is defined by the provider. If this value is specified, an ObjectTypeID must also be specified.
adPermObjTable1A Table object.
adPermObjView5A View object.

F.4.2. ActionEnum Members

The Action option specifies how the permission should be applied to the specified object.

MemberValueDescription
adAccessDeny3Deny the specified permissions.
adAccessGrant1Grant the specified permissions. The permissions specified are added to those that have already been granted.
adAccessRevoke4Revoke all permissions.
adAccessSet2Set the specified permissions. Only the specified permissions will be in force.

F.4.3. RightsEnum Members

The Rights option specifies the actual rights, or permissions, for denying, granting, revoking, or setting.

MembersValueDescription
adRightCreate16384The user/group has permission to create a new object of the specified type.
adRightDelete ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required