> 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 :).