Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox showing variable secondary table
Message
 
À
23/01/1999 21:03:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00179495
Message ID:
00179516
Vues:
26
>I've been out of VFP for several months and have forgotten a few things about the environment. If I have 2 tables open with a form but with no relation set between them and one of the textboxes on my form will display a field from the secondary table based on a field from the other, can I use a select statement to show the corresponding value based on a key field in the current record ? I did this with a combobox I used a select statement into a cursor to prevent changing the current work area.... can I do a similar thing with a textbox ?

Sure when the record changes in the first table (or whatever event that happens that will change the value in the textbox) just do select or a find to get the value to stuff into the text box. Example:

* get the approriate value in table2
select avalue from table2 where table1thingy = table2.something into cursor1
* assign the value to the textbox
mytextbox.value = cursor1.avalue

Just a question... how come you are letting relations in the dataenivronment do the work for you?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform