hello guys...
i have a problem with my DataEnvironment1 and show my DataReport in my app
the code is:
the problem is: when i press a Print button the report shows the data correctly but when i close it and try to reopen it again i face this error:
Run-time error 3705: this operation is not allowed when the object is open.
So.. i tried to write some codes to close the connection and recordset after terminate the report by:
but i face this error:
Run-time error 3709: the connection cannot be uesd to perform this operation. It's either closed or invalid in this context.
Also i tried to close only one of the above Closes not both, but the same problem.
Please help me!!!!!!
i have a problem with my DataEnvironment1 and show my DataReport in my app
the code is:
Code:
DataEnvironment1.Connection1.ConnectionString = App.Path + "\db1.mdb"
DataEnvironment1.rsCommand1.Open "select in_pay,in_pay_date,typein,std_nm from inmoney order by typein"
DataReport1.Show
Run-time error 3705: this operation is not allowed when the object is open.
So.. i tried to write some codes to close the connection and recordset after terminate the report by:
Code:
With DataEnvironment1
.rsCommand1.Close
.Connection1.Close
End With
Run-time error 3709: the connection cannot be uesd to perform this operation. It's either closed or invalid in this context.
Also i tried to close only one of the above Closes not both, but the same problem.
Please help me!!!!!!