lone_rider15
Registered User.
- Local time
- Today, 09:04
- Joined
- Nov 6, 2016
- Messages
- 32
Hello everyone,
I have an Access Application with SQL server as back end. I am trying to call a stored procedure from Access. Below is my code.
"qryMyPass" pass through query runs fine. "spAddressMissingQue" runs perfectly in SQL. The code fails and highlights in ".Execute".
Hope someone can help me with this.
I have an Access Application with SQL server as back end. I am trying to call a stored procedure from Access. Below is my code.
Code:
Private Sub AssignReview()
Dim rst As Object
Set rst = Me.RecordsetClone
Me.Requery
If rst.EOF Or rst.RecordCount = 0 Then
DoCmd.SetWarnings False
With CurrentDb.QueryDefs("qryMyPass")
.SQL = "EXEC spAddressMissingQue'" & [Forms]![frmLogin]![txtUserId] & "'"
.Execute
End With
DoCmd.SetWarnings True
Me.Requery
End If
End Sub
"qryMyPass" pass through query runs fine. "spAddressMissingQue" runs perfectly in SQL. The code fails and highlights in ".Execute".
Hope someone can help me with this.