>Hey all,
>
>In my form base-class, I have put some code in the 'load' event to set the datapath correctly. I do this by looping through the objects, and for each cursor setting the 'database' property to a variable stored on my application object.
>
>This works excellent on most of the forms, however on some I get the following error:
>
>'Property setting will not take effect until data environment reloaded'
>
>I have looked at all the various aspects of the forms, but can not find anything specific that could cause this error.
>
>Anyone have an idea what may cause this?
If there's any code in de.BeforeOpenTables, that code will run before form.load, and it seems that with .autoopentables the tables get open before form.load, so then it's too late to do anything.
When I had to do something like this, I put the method to do it into the app object, and each DE in each form (yeah, but did it only once) had this line in the BeforeOpenTables:
goApp.SetDeEnv(this)
.
Never had problems after that.