Click to See Complete Forum and Search --> : Data Environment and Data Report in VB6. Please Help!!!


Sava
May 24th, 1999, 10:22 AM
I want to print a report using de-dr in vb6 (from ms access). When I did this for the first time it worked perfectly, but if I want to run it again (to choose another date range for example) I got Run-time error '3705':
The operation requested by the application is not allowed if the object is open.

This is the line where I got the error.

deCustomer.Classification_Grouping Date1.Text, Date2.Text, ""

I use an SQL Statement to select the source data.

SELECT * FROM Table WHERE ([Date] between ? and ?) AND Status<>?

I have 3 param: date1, date2 and status. I also make a group by Classification.

Thanks very much.

bgoolsby
May 29th, 1999, 09:00 AM
I read your problem on the internet. Did you ever get a solution to your problem?!? I am having the exact same problem, and I have tried several other ways. Instead of using the command like you are doing, I even created two more commands that use a temporary table and the report pulls from the temp table, but once you run the report the first time, it continues to display the same data, even if you do not select the same criteria. It is like the report is still "open" in memory. I really need the same solution to your problem. If you give me your e-mail maybe we can find the solution together!! My e-mail is bgoolsby@mindspring.com.I cannot believe there is not more help on the data reporting/environment!
Please let me know if you find a solution!!