>>>Hi all,
>>>
>>> How can I change the "THISFORM.DATAENVIRONMENT.CURSOR1.DATABASE = "________"?
>>>I've tried to control in the Dataenvironment object method BeforeOpenTables, but
>>>still not working properly, sometimes it work and sometimes not.
>>>
>>> Pls. help.
>>>
>>>Thanks,
>>>Renel
>>Renel,
>>
>>Ok this one's is certainly not intuitive. The OpenTables fires before the BeforeOpenTables and opens the tables. So your reseting of the databse pointer property is happening too late to affect the opening of the tables by the DE. Move your code to the OpenTables method or the Init of the DE.
>
>It didn't work.........any other way?
Renel,
Try explicitly including the .DBC extention. For example, in the BeforeOpenTable method:
this.Cursor1.Database = "MyDB.DBC"
John.
It's "my" world. You're just living in it.