Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
Dim param1 As ADODB.Parameter, param2 As ADODB.Parameter, param3 As ADODB.Parameter, param4 As ADODB.Parameter
' Connect
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
Set param1 = cmd.CreateParameter("lanme", adVarChar, adParamInput)
*** THIS IS THE LINE IT COMES BACK WITH THE ERROR TO
cmd.Parameters.Append param1
*****
param1.Value = Me.lst_bp.Column(0)
Set param2 = cmd.CreateParameter("fname", adVarChar, adParamInput)
cmd.Parameters.Append param2
param2.Value = Me.lst_bp.Column(1)
Set param3 = cmd.CreateParameter("id", adSmallInt, adParamInput)
cmd.Parameters.Append param3
param3.Value = Me.lst_bp.Column(2)
' Set up a command object for the stored procedure.
cmd.CommandText = "dbo.proc_insert_position"
cmd.CommandType = adCmdStoredProc
' Execute command and return results to recordset
Set rst = cmd.Execute