childrenfirst
Technical User
Hi,
I am trying to run a SQL stored procedure with the output in an Access (.adp file) form. Here is my vba code which does not work when it tries to execute the stored procedure... Any advise will be greatly appreciated!
Private Sub cmdCreateAuditList_Click()
Dim strRecordSource As String
Dim strAuditCreationDate As String
Dim strListDescription As String
Dim strBillerGroup As String
Dim strNumofClaims As String
Dim strStartDate As String
Dim strEndDate As String
Dim strInsertNewList As String
Dim strReportNum As String
strAuditCreationDate = Me.txtAuditCreationDate
:
:
'pass parameters to the stored procedure and execute the stored procedure
strRecordSource = "Exec [s_SelectRandomClaim] '" & strAuditCreationDate & "','" & strBillerGroup & "', " & Me.txtClaimsPerBiller.Value & ",'" & strStartDate & "','" & strEndDate & "'"
DoCmd.OpenStoredProcedure "strRecordSource"
End Sub
I am trying to run a SQL stored procedure with the output in an Access (.adp file) form. Here is my vba code which does not work when it tries to execute the stored procedure... Any advise will be greatly appreciated!
Private Sub cmdCreateAuditList_Click()
Dim strRecordSource As String
Dim strAuditCreationDate As String
Dim strListDescription As String
Dim strBillerGroup As String
Dim strNumofClaims As String
Dim strStartDate As String
Dim strEndDate As String
Dim strInsertNewList As String
Dim strReportNum As String
strAuditCreationDate = Me.txtAuditCreationDate
:
:
'pass parameters to the stored procedure and execute the stored procedure
strRecordSource = "Exec [s_SelectRandomClaim] '" & strAuditCreationDate & "','" & strBillerGroup & "', " & Me.txtClaimsPerBiller.Value & ",'" & strStartDate & "','" & strEndDate & "'"
DoCmd.OpenStoredProcedure "strRecordSource"
End Sub