Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the same form for different tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00238420
Message ID:
00238764
Vues:
14
>>I'm not sure I completely understand the problem here, but here's one thing to keep in mind. You can modified certain properties of the DE in the Init method with bound controls. Naturally, the property has to be writable at run-time (such as the cursor alias or cursor source). You do, however, have to do this prior to the tables being physically opened. If you set AutoOpenTables to .F. you can modify these properties in the Init, then issue This.DataEnvironment.OpenTables without any problem.
>>
>
>George, this is all completely true, but changing the necessary properties in the init is too late for controls whose ControlSource property was set to the expected alias at design time.

Hi Erik,

Well, as I said, I'm sure I completely understand what's going on here. I made some assumptions in this reply. First was that the forms dealt with free tables. The second was that the structures were identical in terms of field names.

Given this, there would be nothing to stop you from changing the CursorSource property and leaving the alias the same. That's the basic premise here. I should point out, however, that there's nothing to stop you from looping through each of the controls on the form and changing the ControlSource property of each control. Admittedly, this is not the most elegant of solutions (Can you say "kludge", boys and girls?).

My choice would custom DEs wrapped in a Session that also wrapped the form itself. I think it's a lot more flexible implementation.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform