R
rj_budz
I must be missing something, because this issue is not addressed anywhere and
it seems to be a significant omission:
I'm attempting to get the permissions of all my users for all the objects
within a database (with a networked system.mdw), using VBA so I can export
it to Excel to play with.
I can get all user names, all groups, all forms, tables, etc. so it's just a
matter of looping through everything to get what I want. As a trial run I
hard coded the user group, object name and object type in GetPermissions
within a Function.
The problem arises with the function's return value.
The answer I get is: 147456
What does this mean? Please don't tell my "What is life, the universe and
everything?" though I wouldn't be overly surprised.
Microsoft has the GetPermissions fuction being fed into a function called
‘DecodePerms()’ which is all well and good if they had that code as well,
which they don't.
Here is the pertinent code from Microsoft:
==================================================================
Set catDB = New ADOX.Catalog
With catDB
' Open Catalog object by using connection to current database.
.ActiveConnection = CurrentProject.Connection
( ...)
' Retrieve current permissions and display them in the Immediate window.
lngRightsNow = .Groups(strGroup).GetPermissions(varObjName,
lngObjectType, _
varObjectID)
Debug.Print DecodePerms(lngRightsNow)
End With
==================================================================
It seems kind of dumb to spend the time to create an explanation if it
leaves out the most important part, don’t ya think?
Someone must have used the GetPermissions method at some point in history
and survived to write about it.
Any help out there?
it seems to be a significant omission:
I'm attempting to get the permissions of all my users for all the objects
within a database (with a networked system.mdw), using VBA so I can export
it to Excel to play with.
I can get all user names, all groups, all forms, tables, etc. so it's just a
matter of looping through everything to get what I want. As a trial run I
hard coded the user group, object name and object type in GetPermissions
within a Function.
The problem arises with the function's return value.
The answer I get is: 147456
What does this mean? Please don't tell my "What is life, the universe and
everything?" though I wouldn't be overly surprised.
Microsoft has the GetPermissions fuction being fed into a function called
‘DecodePerms()’ which is all well and good if they had that code as well,
which they don't.
Here is the pertinent code from Microsoft:
==================================================================
Set catDB = New ADOX.Catalog
With catDB
' Open Catalog object by using connection to current database.
.ActiveConnection = CurrentProject.Connection
( ...)
' Retrieve current permissions and display them in the Immediate window.
lngRightsNow = .Groups(strGroup).GetPermissions(varObjName,
lngObjectType, _
varObjectID)
Debug.Print DecodePerms(lngRightsNow)
End With
==================================================================
It seems kind of dumb to spend the time to create an explanation if it
leaves out the most important part, don’t ya think?
Someone must have used the GetPermissions method at some point in history
and survived to write about it.
Any help out there?