Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report Error

Status
Not open for further replies.

rcktang

Programmer
Joined
Nov 22, 2002
Messages
2
Location
US
I'm using VB6.
I'm using a form to open up a report:
DepositReport.Show

Then I have in the DataReport that calls a stored procedure:
Private Sub DataReport_Initialize()
DEReports.dbo_sp_rep_Daily_Grouping frm_DepositReports.Dtp_DepositDate.Value, "D"
End Sub

Everything works fine, but when I close the report and try to open the report from the form again, then I get the error shown below:

Run-time error '3705':
Operation is not allowed when the object is open.

What do I need to do to reset the object?

Thanks.
 
After you run your report do you close and set all your database and report objects to nothing ?

ie for a recordset it is good practice to close it and set it to nothing.

rst.close
set rst = nothing

Also when you close your report are you unloading the form or hiding it?

Transcend
 
Where do I close all of the database and report objects?

I'm not too sure how to unload the report either. This is my first time using the Data Report.

Thanks.
 
You should close all of your database objects as soon as you have used them.

ie once you open your report if you are using a recordset for example, straight after you have used it
close it and set it to nothing.

How do you close the datareport? Do you have a button on it for closing or do you just use the little x .. ???

Transcend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top