S
scuba79
I have a secured database using a mdw file that was created with the
database. I have some code that will be run under one of the user accounts.
That account does not have any rights to the tables. I need to be able to
give them rights to the tables just as long as the code is running. Here is
the code that I'm currently using.
While Not rst.EOF
Set con = db.Containers("Tables")
Set doc = con.Documents(rst("Name"))
doc.UserName = "pdlead"
doc.Permissions = dbSecFullAccess
con.Documents.Refresh
rst.MoveNext
Wend
ImportLoc = GetFileName
this runs without any problems, however, when I click on another button. I
get an error message stating that the user does not have permissions to
"work" with the tables.
Any assistance is greatly appreciated
database. I have some code that will be run under one of the user accounts.
That account does not have any rights to the tables. I need to be able to
give them rights to the tables just as long as the code is running. Here is
the code that I'm currently using.
While Not rst.EOF
Set con = db.Containers("Tables")
Set doc = con.Documents(rst("Name"))
doc.UserName = "pdlead"
doc.Permissions = dbSecFullAccess
con.Documents.Refresh
rst.MoveNext
Wend
ImportLoc = GetFileName
this runs without any problems, however, when I click on another button. I
get an error message stating that the user does not have permissions to
"work" with the tables.
Any assistance is greatly appreciated