Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter for selecting view
Message
From
19/10/2001 09:39:55
 
 
To
19/10/2001 07:28:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00570305
Message ID:
00570786
Views:
26
>>>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.
>
>On reading your message again, I think you are proposing to postpone opening the tables. I wonder, if I do this in Form.Init(), after accepting the parameters, wouldn't this cause problems with unbound objects?
>
>Hilmar.

It would cause problems with design-time bound controls, yes. This approach would require binding controls programmatically after the DE has been setup.
Previous
Reply
Map
View

Click here to load this message in the networking platform