I am completely frustrated as this shoudl work. Right ?:eek2:
Where I have it bolded those lines have been commented out to change the inline SQL query to a stored procedure without paramaters to be executed.
Where I have it bolded those lines have been commented out to change the inline SQL query to a stored procedure without paramaters to be executed.
Code:
Private Sub updateIncludeNotes(lngTranKey As Long)
Dim cmd As New ADODB.Command
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set cmd = New ADODB.Command
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "spPanLetterUpdate"
cmd.ActiveConnection = cn
'sql = "UPDATE tblTransDetail SET fldIncludeNotes = 0" & _
"WHERE" & _
"fldTranKey =" & lngTranKey
cn.Open strConnectionString
'rs.Open sql, cn, adOpenKeyset, adLockOptimisticOn Error GoTo ProcError
Set rs = cmd.Execute
cn.Close
Set rs = Nothing
Set cn = Nothing
ProcExit:
Exit Sub
ProcError:
MsgBox ("The updating Process for PanLetters failed. Please enter the changes manually. Thank You. ")
Resume ProcExit
End Sub