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
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