M
Michael D. Reed
I am trying to use a table value function in a SQL server to fill a list box.
I keep getting the following error message “Microsoft OLE DB Provider for
SQL Server --> The parameter is incorrect.†When I the objCmd.Execute is
Executed the statement in the code snipe below.
Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
Dim objParm1 As New ADODB.Parameter
' Set CommandText equal to the stored procedure name.
objCmd.CommandText = "GetByModelUnassignedOptions"
objCmd.CommandType = adCmdStoredProc
' Connect to the data source.
Set objConn = Application.CurrentProject.Connection
objCmd.ActiveConnection = objConn
' Automatically fill in parameter info from stored procedure.
objCmd.Parameters.Refresh
' Set the param value.
objCmd.Parameters(1) = Me.Model_ID
' Get the data
Dim objRS As Object
Set objRS = objCmd.Execute
I am using Access 2003 and SQL Server 2005.
Where can I get a code example to fill a list box when ever the parent form
record changes?
I keep getting the following error message “Microsoft OLE DB Provider for
SQL Server --> The parameter is incorrect.†When I the objCmd.Execute is
Executed the statement in the code snipe below.
Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
Dim objParm1 As New ADODB.Parameter
' Set CommandText equal to the stored procedure name.
objCmd.CommandText = "GetByModelUnassignedOptions"
objCmd.CommandType = adCmdStoredProc
' Connect to the data source.
Set objConn = Application.CurrentProject.Connection
objCmd.ActiveConnection = objConn
' Automatically fill in parameter info from stored procedure.
objCmd.Parameters.Refresh
' Set the param value.
objCmd.Parameters(1) = Me.Model_ID
' Get the data
Dim objRS As Object
Set objRS = objCmd.Execute
I am using Access 2003 and SQL Server 2005.
Where can I get a code example to fill a list box when ever the parent form
record changes?