Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox showing variable secondary table
Message
 
 
To
23/01/1999 21:03:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179495
Message ID:
00179516
Views:
25
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform