Hi,
I'm having a lot of trouble changing the CommandText property of a Data Environment.
I just moved over to an Access 2000 Database which in turn uses the Jet 4.0 OLE DB Provider. But when I try and change the CommandText property in code I get the following error:
Run Time Error
'-2147352567 (80020009)'
Method 'Item' of Object 'Commands' failed.
Here's the code I'm trying to execute:
Code:
Dim sqlstr as string
sqlstr = "SELECT BLAH FROM BLAH"
DataEnvironment.Commands(1).CommandText = sqlstr
DataReport.Refresh
DataReport.Show
It bugs out right at the DataEnvironment line. I have NO idea why it doesn't work. Can anyone enlighten me please? Thanks.
Distressed, upset, frustrated...
Nicholas