G
Guest
I have a subreport that when I run it by itself it prints the correct
information.
When I run the main report that has this sub report, I get the following
error.
"Run-time error 2191, You can't set the RecordSet Property in print previwe
or after printing has started"
Below is what I have in the sub report open event
Private Sub Report_Open(Cancel As Integer)
Dim objCmd As New ADODB.Command
Dim tmpESID As Variant
Set objCmd = New ADODB.Command
objCmd.ActiveConnection = Application.CurrentProject.Connection
objCmd.CommandType = adCmdStoredProc
objCmd.CommandText = "GetRepGroups"
' Stored Procedure Parms
objCmd.Parameters("@optionNumber").Value = "2"
' for testing purposes will set to a variable once I get it working
objCmd.Parameters("@InputID").Value = "{12345678-ABCD-9999-ABCD-
123456789012}"
Set Me.Recordset = objCmd.Execute
Thanks
ToniS
information.
When I run the main report that has this sub report, I get the following
error.
"Run-time error 2191, You can't set the RecordSet Property in print previwe
or after printing has started"
Below is what I have in the sub report open event
Private Sub Report_Open(Cancel As Integer)
Dim objCmd As New ADODB.Command
Dim tmpESID As Variant
Set objCmd = New ADODB.Command
objCmd.ActiveConnection = Application.CurrentProject.Connection
objCmd.CommandType = adCmdStoredProc
objCmd.CommandText = "GetRepGroups"
' Stored Procedure Parms
objCmd.Parameters("@optionNumber").Value = "2"
' for testing purposes will set to a variable once I get it working
objCmd.Parameters("@InputID").Value = "{12345678-ABCD-9999-ABCD-
123456789012}"
Set Me.Recordset = objCmd.Execute
Thanks
ToniS