sid61
|
Posted: 08/31/2003, 2:25 PM |
|
Hi,
i have a little problem with my label output.
I use a database for the main datas. in some of the fields, i have second tables with lists.
i will wrote it here for better understanding.
the main table has a field with name "target_xy"
for the targets i have use a second table like
key | description
------------------
1 | target 1
2 | target 2
3 | target 3 and so on
When i am using now a grid for display the informations about the target list,
it will display in the field "target_xy" only the key Numbers. There is no bound and display option.
but i must have the values from the lists. when also have the database field
"target_xy" the value 2 it should be displayed in the field "target 2" instead the numer "2".
how can i do this ???
thanks a lot for helping in this Forum !
regards sid61
|
|
|
Bruce Van Horn
|
Posted: 09/01/2003, 11:30 PM |
|
I'm not completely sure I understand your question, but if you are talking about having one table with a field called target_xy, which relates to a second table (called targets for our purposes) you can solve your output problem one two ways.
If the relationship between the two tables is one to one, then you can do a join against the two tables and specify the second table's target value as the control source for the label.
If the relationship is one to many, but the target field is always the same (perhaps there are other fields which are different on the 'many' side of the equation), you can use 'select distinct' in your query and create the same join I mentioned earlier.
Finally if its one to many and a join just won't do it, you can code a lookup. Check the documentation on CCLookup and do a lookup on the target table.
Hope this helps.
|
|
|
|