Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add group permission when creating a table

Status
Not open for further replies.

TheDoubleB

Programmer
Jan 29, 2001
18
0
0
US
I have a secure DB that has code to delete and then recreate a new table. When the table is recreated the owner is the current user and when another user with the same group permissions logs on, it will not let them delete and recreate this table.

Set tdf = dbs.CreateTableDef("Pool1Employees")
Set fld1 = tdf.CreateField("RecOrder", dbLong)
fld1.Attributes = fld1.Attributes + dbAutoIncrField
Set fld2 = tdf.CreateField("SSN", dbText, 50)
tdf.Fields.Append fld1
tdf.Fields.Append fld2
dbs.TableDefs.Append tdf
dbs.TableDefs.Refresh
DoCmd.RunSQL "INSERT INTO Pool1Employees...

I need to add a group permission to the table when I create it so that ownership is not exclusive to the user who created it, but to a group.
 
Hi!

I think you will need to look at the Permissions property and maybe the Inherits property of the Tables Container object. Since this is a new table you may need to use the CreateProperty method first. You should be able to find the information(and examples) you need in Access help. If you are having trouble puzzling it out, let me know.

hth
Jeff Bridgham
 
I haven't been able to find any sort of help or solution about granting group permission to a table without going through the security menu. Can I use the Owner property in the MYSYSOBJECTS? and if I do, how does system know if its a group or user permission?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top