Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox showing variable secondary table
Message
From
24/01/1999 08:25:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179495
Message ID:
00179544
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?

Hi Evan,

Thanks for the response. I guess your question is why am I not using a relation in the Dataenvironment..... have'nt used such a thing in any application I've wrote to date and I tend tobe a creature of habit.... I'll try it and see how it goes.

I thought a relation might get in the way ie. in my case I've got a Purchase Order Header file that holds a key value for the Vender Master and thought if someone deletes the Vender Code that's in the P.O. Header Master it could cause problems with some open P.O.'s.


Again Thanks,

Don
Previous
Reply
Map
View

Click here to load this message in the networking platform