|
-
Mar 30th, 2006, 05:21 AM
#1
Thread Starter
Lively Member
problem with DataReport and DataEnvironment
Hi,
I have a DataEnvironment and a DataReport in my Visual Basic project, in which I am using Access database. When I produce the report, during run-time, and when I close the report, and try to execute another SQL query to produce a second report I get an error, that the object (my DataReport) cannot stay open...
the run-time error that appears is :
"Run-time error 3705: Operation is not allowed when the object is open"
And when I press "Debug" the error is located in line:
DataEnvironement1.Command1 mystr1
at the object DataEnvironment
Can someone pls pls help ???
or if you know a DataReport , DataEnvironment tutorial, can someone please send me the link?
thank you, so much !!!
-
Mar 30th, 2006, 08:55 AM
#2
Junior Member
Re: problem with DataReport and DataEnvironment
try to close ur objects
like
rs.close
set rs=nothing
-
Mar 30th, 2006, 09:21 AM
#3
Re: problem with DataReport and DataEnvironment
-
Apr 2nd, 2006, 05:18 AM
#4
Thread Starter
Lively Member
Re: problem with DataReport and DataEnvironment
-
Apr 2nd, 2006, 09:58 AM
#5
-
Apr 2nd, 2006, 10:10 PM
#6
Frenzied Member
Re: problem with DataReport and DataEnvironment
what the above posts are talking is about the use of ado connection and recordsets.
i strongly suggest that you stop using data environment and migrate to using ado for more flexibility and lesser problems with your system.
check out beacons ado tutorial here
http://vbforums.com/showthread.php?t=337051
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
-
Apr 6th, 2006, 02:29 AM
#7
Thread Starter
Lively Member
Re: problem with DataReport and DataEnvironment
But I tried to go with ADO before and it was not working.. so I found a tutorial explaining step-by-step how to use DataEnvironment and Commands ...and so I did it with this...
The problem remains; I cannot produce more than once a report....
Can anyone please help me?
-
Apr 6th, 2006, 02:40 AM
#8
Addicted Member
Re: problem with DataReport and DataEnvironment
try this.. i hope it could help.
VB Code:
On Error Resume Next
dataenviroment1.rsCommand.close
dataenvironment1.command mystr
On Error Goto 0
myreport.show
-
Apr 6th, 2006, 04:35 AM
#9
Thread Starter
Lively Member
Re: problem with DataReport and DataEnvironment
My problem is solved with this!!!
thank you very much Alexis23 !!!!
-
Aug 22nd, 2006, 08:43 PM
#10
New Member
Re: problem with DataReport and DataEnvironment
Try this in frm DataReport
Private Sub DataReport_Terminate()
DataEnvironment1.rsRecordset.Close
End Sub
change "rsRecordset" for your app
I´m sorry but my English is bad
I'm only try help you ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|