With OwnerAccess Option

D

Douglas

Why is it that when I create an Update query and set Run
Permissions to Owner that a user who has no table
permissions can run the query and update the
table...but...when I tried: DoCmd.RunSQL "Update Table01
SET Field02 = 'Test' WITH OWNERACCESS OPTION;" I got an
error that the user does not have permissions. I thought
I was doing the same thing as in the query.

Thank you for your help.
 
J

Joan Wild

No it isn't the same thing. When you 'run' a sql statement in code, Access
creates a temporary query and runs it. The WITH OWNERACCESS OPTION in code
is pointless. The user that runs it will own the temporary query, and as
owner with no permissions on the underlying query, gets nowhere.

Either create a saved RWOP query based on Table01 (then run an update on the
RWOP query)
or create a saved RWOP update query and run it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top