Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameter for selecting view
Message
De
19/10/2001 07:19:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/10/2001 12:00:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570305
Message ID:
00570707
Vues:
15
>>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.

Crescencio,

Yes, and I can also open the tables in Form.Load().

However, my question was how detect which table to open, based on a parameter. I think Nadya's answer is exactly what I need.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform