Pass Through Query Question

J

Joe Williams

I am using VBA code to update teh SQL of a pass through query to SQL server.
Code looks something like this:

Set dbCurr = CurrentDb()
Set qdfCurr = dbCurr.QueryDefs("Tooling Labor Report By Job")
strSQL = "Exec spToolingLaborByJob "
strSQL = strSQL & "@StartDate='" & Me.beg & "'," & "@EndDate='" & Me.end &
"'," & "@JobNumber='" & Me.JobNo & "'"
qdfCurr.SQL = strSQL

Works great. The problem I am having is that when a normal user, one without
admin priveleges, clicks the button to update the SQL and run the query,
they get a message "You do not have the necessary permission to use the
MsysTables object"

If the user just runs the pass through from the databaser window, it runs no
problem, so I am thinking it is bombing out when it tries to set the SQL on
the pass through.

What's the deal, and how can I make the pass through query work for anyone
who runs the code?

Thanks
 
J

Joe Williams

Hello all -

I did some more searching and found the answer from Joan Wild on the
security group - The users need to have write permissions to the pass
through query. Thanks Joan!

Joe
 

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