I have a form that allows my admins to create groups. I want all of these groups to have the same permissions so I created a test group and set the permissions, then through code looked at what the permissions were. But if I change some form permissions and such the permission return remains the same. How can I, down to a single object, set permissions through code. Below is the routine I use currently.
Would I have to have a template group which I somehow copy each time so that the permissions are the same?
Dim db As Database
Dim con As Container
Dim doc As Document
Set db = CurrentDb
Set con = db.Containers("Databases")
Set doc = con.Documents("MSysdb")
doc.UserName = strType & "_" & txtGroupName
'Set group permissions
doc.Permissions = 2
Set db = Nothing
Set con = Nothing
Set doc = Nothing