>In a form, I want to alternately open View1, View2, or Table1 (the table underlying both views), based on a parameter.
>
>Parameters are accepted in Form.Init(). Form.Load(), or DataEnvironment.OpenTables(), gets called before Form.Init(), right?
>
>Is there any workaround for this situation, other than creating several copies of the form (with inheritance, of course)?
>
>TIA, Hilmar.
You can open the tables programmatically like so:
This.DataEnvironment.AddObject("myAlias", "Cursor")
With This.DataEnvironment.myAlias
.Alias = "myTable"
.CursorSource = "mytable.dbf"
EndWith
This.DataEnvironment.OpenTables()
Set the DE AutoOpenTables to .F. before this.