AccessLayout Object

  • Thread starter Thread starter Alton
  • Start date Start date
A

Alton

What is the AccessLayout object and how do you give
permissions to it. When trying to grant permissions to a
group I get an error message that I don't have the
necessary permissions to use the object.
 
AccessLayout is used for internal purposes (like the MSys* tables).

Why are you trying to grant permissions on it?

It should work correctly for all users, by default.

HTH,
TC
 
Thanks for your reply. I am not trying to specifically
grant permissions to it. Here is what I am using:

Function Grant_FullAccess()
On Error GoTo Err_GrantPermissions

Dim DB As DAO.Database, i As Integer, J As Integer, G
As Group
Set DB = DBEngine(0)(0)

msg = "Enter the Name Group to Grant
Permissions:" 'Enter the group's name
Title = "Grant Group Full Permissions"
groupname = InputBox(msg, Title)

MsgBox "This process will take a few minutes." & Chr
(13) & Chr(10) & "Click OK and wait until you see the
Summary Message.", 48, "Grant a Group Permissions to the
Database"

DoCmd.Hourglass True
ReturnValue = SysCmd
(SYSCMD_INITMETER, "Updating... ", 7)
For i = 0 To DB.Containers.Count - 1
For J = 0 To DB.Containers
(i).Documents.Count - 1
ReturnValue = SysCmd(SYSCMD_UPDATEMETER,
i)
DB.Containers(i).Documents(J).UserName =
groupname
DB.Containers(i).Documents(J).Permissions
= dbSecReplaceData Or dbSecRetrieveData Or
dbSecReplaceData Or dbSecInsertData Or
DB_SEC_FRMRPT_EXECUTE Or DB_SEC_MAC_EXECUTE Or
dbSecDBOpen Or dbSecDeleteData
Next J
Next i

ReturnValue = SysCmd(SYSCMD_REMOVEMETER)
DoCmd.Hourglass False
MsgBox "You have given Full Permissions for Tables,
Querys, Forms, Reports & Macros (Except to administer
permissions to other groups) to " & " " & groupname,
64, "Grant Group Full Permissions Complete"


Exit_Err_GrantPermissions:
Exit Function

Err_GrantPermissions:
DoCmd.Hourglass False
ReturnValue = SysCmd(SYSCMD_REMOVEMETER)
Call LogError("Grant Full Access
Error", "Grant_FullAccess()", Err.Description,
Err.Number, Now)
MsgBox "Group name " & "<" & groupname & ">" & " is
not correct. The name is either misspelled or does not
exist in the security module.", 48, "Invalid Group Name"
Resume Exit_Err_GrantPermissions


End Function

This is the message that I receive:

"An error has occured. Please notify your database
administrator.
You do not have the necessary permissions to use
the 'AccessLayout' object. Have your system
administrator or the person who created this object
establish the appropriate permissions for you."
 
Well, you are trying to change permissions for every document in every
container! But there are many documents in several containers that you will
never have permission to do that to. (For example, if you could grant
add/edit/delete permission to the current user on the MSysACEs table, then,
the current user would become a super-user who could grant anything to
anyone!) So you must either ignore "system" objects (but there might not be
a consistent way to identify those), or, trap the error which says that you
do not have permission to grant permissions on that particular object.

HTH,
TC
 
Back
Top