With Owneraccess Option Not Working In Code
Posted on 2002-06-07
i have a testuser that does not have permissions to edit tblMailMergePrintQueue.
i want the table to be appended though regardless of permissions and i want to do this through code, so i do this:
DoCmd.RunSQL ("INSERT INTO tblMailMergePrintQueue (QueueDate, QueuedBy, JobNum, MailMergeDocumentID)" & _
" SELECT Date() As QueueDate, CurrentUser() as QueuedBy, '" & Me.cboJobID.Column(1) & "' as JobNum, 37 as MailMergeDocumentID WITH OWNERACCESS OPTION;")
notice the "WITH OWNERACCESS OPTION". when testuser tries to run this, he gets the much dreaded "Operation must use an updateable query" error.
if i move the exact SQL statement in a query object and then i call it through code like this:
everything works fine this way.
is there something i'm missing here? does WITH OWNERACCESS OPTION not work in code? i cant find any KB article on this.