I have the following stored procedure which executes perfectly on a click event of a button. however, when I add the code to an afterupdate event, it wont execute.
Any reason why?
Any reason why?
Code:
Dim cmdCommand As New ADODB.Command
With cmdCommand
.ActiveConnection = CurrentProject.Connection
.CommandType = adCmdStoredProc
.CommandText = "UpdateScores"
'@intDocumentNo
.Parameters("@StatusScore").Value = Forms!frmLeads!frmScoreSummary.Form.Text6
'@intCustomerNo
.Parameters("@LeadID").Value = Me![LeadID]
.Execute
End With