Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code Table & Relations
Message
From
22/07/1997 04:11:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/07/1997 09:59:09
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00039964
Message ID:
00041048
Views:
33
> Now I need to relate the code fields in the network table to the > appropriate fields in the allcodes table, i.e. network.vendorcode to > 'allcode.codeno for codetype=vendor' so I can display the proper values in > my forms. HELP!!! =8^0 > > How do I do this? Am I'm doing this right? Any advice would be incredibly > appreciated since I think my boss is getting impatient with the length of > time this thing is taking and I'm feeling a bit overwhelmed. > > MTIA!! > Mandy I think we've discussed this before... my first advice is to rewind the messages since... I won't tell your boss how long ago :) - there were several approaches suggested. Now here's the quick'n'dirty: use allcodes order codetype do while !eof() ntype=trim(codetype) * not sure if this declaration is ok syntactically, may need work: public array ("l_"+ntype+"(1)") copy fields codeno, displayvalue to array ("l_"+ntype); while ntype=codetype enddo Now in any combo or whatever, you can use RowSourceType array, and for alias.vendor you put aray l_vendor etc. Your arrays will have two columns - codeno in one and displayvalue in the other. Since all of them will have uniform arrays and syntax (I refer to the ControlSource and the array name relationship) you can write one class and just change names. Do it in one day (ain't I optimistically buffered :). If you want to show DisplayValue only, you can Copy Fields displayvalue, codeno (in that order) and even issue =asort(("l_"+ntype)) ....so your DisplayValues get ABC ordered, etc, etc - once you get this to work. BTW, using "l_" as a prefix is my personal preference - use any other prefix you like, but be consistent (and/or persistent :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform