You'll need to put that code in the procedure that calls the Data Report I think, not in the Data Report itself. Because the Data Report is bound, you'll need the commandtext set before the Data Report gets opened.
If you still get that error after moving the code, you might try putting this...
Hi wacks,
The code you want is:
DataEnvironement1.commands("Command1").CommandText = strSQL
You'll need to close any open recordset and then reopen it after you change it, something like this:
if DataEnvironement1.rsCommand1.State=adstateopen then dataenvironment1.rscommand1.close...
Actually, you might look at using a Microsoft Rich Text Box control if it suits your purposes otherwise. It already has a built in find command which can find multiple instances of a word. It's included with Visual Basic already, just add it to your Project from the Components menu.
J. Broadus...
I'm trying to do what seems like it should be a simple task, but is turning into a nightmare. I have a program with an Access 2000 database, which needs to store an image into an OLE Object field, and then retrieve that image for a Crystal Reports report to display.
I'm using an unbound form...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.