J
Jason
Hi,
I've this function for passing values to stored procedures by using a
pass-through-query, but i can't manage to bind to a form's recordsource to
display the data.
Here's the code:
Public Sub SetSPArguments(ByVal strQueryName As String, ByVal strArguments
As String)
On Error GoTo Err_SetSPArguments
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSPCall As String
Set db = CurrentDb
Set qdf = db.QueryDefs(strQueryName)
strSPCall = qdf.SQL
strSPCall = Left(strSPCall, InStr(InStr(strSPCall, " ") + 1, strSPCall,
" "))
qdf.SQL = strSPCall & strArguments
qdf.Close
Exit_SetSPArguments:
Set db = Nothing
Set qdf = Nothing
Exit Sub
Err_SetSPArguments:
MsgBox Err.Description
Resume Exit_SetSPArguments
End Sub
Can someone help me with this?
Thnx
I've this function for passing values to stored procedures by using a
pass-through-query, but i can't manage to bind to a form's recordsource to
display the data.
Here's the code:
Public Sub SetSPArguments(ByVal strQueryName As String, ByVal strArguments
As String)
On Error GoTo Err_SetSPArguments
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSPCall As String
Set db = CurrentDb
Set qdf = db.QueryDefs(strQueryName)
strSPCall = qdf.SQL
strSPCall = Left(strSPCall, InStr(InStr(strSPCall, " ") + 1, strSPCall,
" "))
qdf.SQL = strSPCall & strArguments
qdf.Close
Exit_SetSPArguments:
Set db = Nothing
Set qdf = Nothing
Exit Sub
Err_SetSPArguments:
MsgBox Err.Description
Resume Exit_SetSPArguments
End Sub
Can someone help me with this?
Thnx