|
-
Mar 22nd, 2011, 09:05 AM
#1
Thread Starter
New Member
Operation is not allowed when object is open
hai,
I have a problem with my vb code,displaying run time error 3705,"Operation is not allowed when object is open".How to solve this problem.i am using MS access as backend.
Private Sub Command1_Click()
DE1.combine (txtLabNo.Text)
DataReport2.Show
End Sub
error is displayed in line 2.
actually the project is developed for a lab.I want to generate a data report based on the parameter.For this i add a new comand to the connection property of data environment.and in the command properties,on the sql builder section i add the following
SELECT T1.*, T2.* FROM patient_entry T1, combine_result T2 WHERE T1.trc_lab_no = ?
this is to combine the records of two tables and make them as one single data report.
so please advise....
-
Mar 22nd, 2011, 01:02 PM
#2
Re: Operation is not allowed when object is open
Check for your connection. Are you trying to re-open the connection?
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Mar 23rd, 2011, 01:44 PM
#3
Lively Member
Re: Operation is not allowed when object is open
hi, post your code so we can have a look
-
Mar 25th, 2011, 08:58 AM
#4
Addicted Member
Re: Operation is not allowed when object is open
You are trying to connect with 2 object at the same time without closing connection with previous one.
DE1.combine (txtLabNo.Text) 'txtLabNo
DataReport2.Show 'Datareport
Try to connect one object at the same time.
-
Sep 1st, 2012, 10:11 PM
#5
New Member
Re: Operation is not allowed when object is open
you need to close the connection to the dataenvironment like
DataEnvironment1.rsCommand1.Close
you may use another button to effect this line of code
-
Sep 2nd, 2012, 04:41 PM
#6
Frenzied Member
Re: Operation is not allowed when object is open
you need to check if it is open after manipulating data . you need to close the rscommand1 .try the following way .
Code:
DE1.combine (txtLabNo.Text) 'txtLabNo
DataReport2.Show 'Datareport
if DataEnvironment1.rsCommand1.open then 'after showing records you need to close .
DataEnvironment1.rsCommand1.Close
End if
Last edited by firoz.raj; Sep 2nd, 2012 at 04:45 PM.
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
|