C
Chris
Hi,
I have a sub procedure that accepts parameters.
Everything works until the line where I try to bind the recordset to
the subreport in the form.
here is my code:
Dim Cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
' Define a command object for a stored procedure.
Cmd.ActiveConnection = Application.CurrentProject.BaseConnectionString
Cmd.CommandText = storeprocedurename
Cmd.CommandType = adCmdStoredProc
Cmd.CommandTimeout = 15
Cmd.Parameters(1) = searchvalue
' Create a recordset by executing the command.
Set rs = Cmd.Execute
'Me.subReportMain.Form.Recordset = rs
'Me.subReportMain.Form.Recordsource = rs
I've tried all kinds of combinations but I can't get it to bind without
error messages.
Also I think that after I bind I may still need to provide a line of code to
update the form to show the records in the form.
What might that be, if that is the case?
thanks
Chris
I have a sub procedure that accepts parameters.
Everything works until the line where I try to bind the recordset to
the subreport in the form.
here is my code:
Dim Cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
' Define a command object for a stored procedure.
Cmd.ActiveConnection = Application.CurrentProject.BaseConnectionString
Cmd.CommandText = storeprocedurename
Cmd.CommandType = adCmdStoredProc
Cmd.CommandTimeout = 15
Cmd.Parameters(1) = searchvalue
' Create a recordset by executing the command.
Set rs = Cmd.Execute
'Me.subReportMain.Form.Recordset = rs
'Me.subReportMain.Form.Recordsource = rs
I've tried all kinds of combinations but I can't get it to bind without
error messages.
Also I think that after I bind I may still need to provide a line of code to
update the form to show the records in the form.
What might that be, if that is the case?
thanks
Chris