Re: Group Permissions and SQL
- From: "Wolfgang Kais" <w.kais@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 1 Jun 2008 23:11:24 +0200
Hallo "croy".
"croy" wrote:
Split, secured database. Everything working well, except...
In the After Update event for a control on a form, I have
this code:
Private Sub grpLocType_AfterUpdate()
Dim SQL As String
SQL = "DELETE qrysfrmLocPicker.GeoLocId " & _
"FROM tblLocPicker WITH OWNERACCESS OPTION"
DoCmd.SetWarnings False
DoCmd.RunSQL SQL
DoCmd.SetWarnings True
Me![sfrmLocPickerObj].Form.Requery
End Sub
The SQL looks strange. Usually tblLocPicker would be the name of a
table but qrysfrmLocPicker would be the name of a query.
It works fine with the Admins group, and with another group
"Field-Admins". But it won't work with another group having
lesser permissions.
The error is "Run-time error '3112': Records cannot be
read; no read permissions on 'tblLocPicker'", and it leads
to the SQL statement above.
But this groups permissions *do* have permissions to do
anything but administer or modify that linked table. I've
gone so far as to give that group administer permission on
every table, every query, and every form, and it made no
difference. And the SQL refers to a saved query with "Run
with Owner's Permissions".
What am I missing?
The "owneraccess option" doesn't strike through to the backend db,
it only affects the "table link". You will either have to give the
users delete permissions on the backend table or use an IN clause
in the query that contains the path to the backend database:
DELETE * FROM tblLocPicker
IN 'C:\somepath\backend.mdb'
WITH OWNERACCESS OPTION
But wait: Who is the owner of a sql string in code? So you should
save the delete query in the database and execute it using
DoCmd.OpenQuery
--
Regards,
Wolfgang
.
- Follow-Ups:
- Re: Group Permissions and SQL
- From: Joan Wild
- Re: Group Permissions and SQL
- Next by Date: Re: Group Permissions and SQL
- Next by thread: Re: Group Permissions and SQL
- Index(es):
Relevant Pages
|