Operation Is Not Allowed When The Object Is Closed
I'm passing date values as parameters to a data report. Based on the range of dates the report is supposed to show the result. But it works fine if I supplied no parameters. All my three reports work fine without parameters. Pls help me out as to why I'm getting this err. I've established connection to Access Database on Initialise Event of Dataenvironment1.
On Ok command button I've created
rspurchaseofshares.filter = FiltrVals
if Rspurchaseofshares.recordcount >0 then
rspurchaseofshares.show
endif
I'm stuck very badly.Pls help me out.
Thanking U gurus in adv
Sham
Re: Operation Is Not Allowed When The Object Is Closed
pls can you show your code where you acquire the data from the database
Re: Operation Is Not Allowed When The Object Is Closed
Hi ! The code you have shown will only show data when more then one record is there.
Code:
if Rspurchaseofshares.recordcount >0 then
rspurchaseofshares.show
endif
You have not defined rspurchaseofshares. Is that a recordset then .show doesn't fit is it a form then .recordcount doesn't fit for me if you dont give further explanation Lets think we have a record named Myrecords and rspurchaseofshares is a form
What can be said by your codse is that obviously you set params that ends up in no data. Change the code to the following
Code:
if not( MyRecrds.EOF and MyRecords.BOF) then
rspurchaseofshares.show
end if
But in fact please show more code
Jonny Poet