Eddie's Bakery and Cafe' said:
Hi Dirk, thanks for taking the question. I have defined a single
List Box control and two command button controls. The command
buttons are used for NEXT and PREVIOUS commands. I would like to
populate the List Box with new table values (i.e., recipe names)
based on search criteria each time the Next/Previous buttons are
selected. The search criteria will be based on a value selected from
the List Box. If the Previous button is selected, I need to show the
previous table from the List box. The idea is to be able to navigate
through tables based on a search key (primary/foreign keys) in the
forward and backwards directions. Below is an example of the type of
data that might be in the List Box and the sequence of how the search
might be implemented:
Search Start:
Menu TOC <--> Recipe TOC <--> Recipe Categories <--> Recipe Names
I defined the Text Box with multiple columns, two columns for the
keys and one for the name values. I only display the name values in
the text box. The hidden columns are used to retrieve the key value
that will be used in the search operation.
I hope this explains the problem and thanks for your help.
I'm not sure that I do understand what you're trying to do, but I have a
glimmering. You've got a hierarchical table structure, and you want the
list box to display all items from a particular level of the hierarchy
that match the one that was selected at the next higher level. So
you're using this list box and buttons to "drill down" to the
information you want. Is that right?
It would help to know the fields, keys, and relationships of the tables
involved. One thing you haven't mentioned, but that I think you need,
is a structure to keep track of where you are in the table hierarchy and
how you got there. That is, you need that if you want to pop back up
the stack to the previous level and still have the same item selected in
the list box as was there when you drilled down. If you don't care
about that, all you really need to know at any given moment is what
level you're at.