B
Bob Howard
Hi!
I need a technique for coordinating lists in two listboxes. The box on the
left contains a list of people's names. The first column is hidden and is
the record key of the name table. The box on the right will contain a list
of names of those people who have been selected from the box on the left.
The first column is hidden and is the record key. I use a double-click to
select a name (from the left) or de-select a name (from the right).
There are two tables involved. The primary table contains the total list of
names (it's behind the query for the left-hand listbox). The second table
contains a list of those items that have been selected. All I have in this
table are two fields --- a primary key (autonumber ensure unique records)
and a second field which is the record number of the item selected from the
left-hand (primary) table.
I have the program working to the extent that when I double-click a name in
the left-hand listbox, it appears in the right-hand listbox (which gets
requeried to keep the list in alphabetic order). And when I double-click a
name in the right-hand listbox it gets removed from that box.
But what I want to do next is modify the query behind the left-hand listbox
so that the names of those people already selected (and in the right-hand
listbox) don't appear ... they are no longer "eligible".
I already have code to prevent duplicate entries on the right, but I think a
better approach is to not have those people already selected and on the
right to appear on the left. This is somewhat like various programs and how
they handle setting up their tools and Icons on the top of the window ---
the list of available tools/icons is on the left, and the list of the chosen
ones is on the right. Once an item is chosen, it no longer appears on the
left.
Any pointers to a technique for this?
Bob (@Martureo.Org)
I need a technique for coordinating lists in two listboxes. The box on the
left contains a list of people's names. The first column is hidden and is
the record key of the name table. The box on the right will contain a list
of names of those people who have been selected from the box on the left.
The first column is hidden and is the record key. I use a double-click to
select a name (from the left) or de-select a name (from the right).
There are two tables involved. The primary table contains the total list of
names (it's behind the query for the left-hand listbox). The second table
contains a list of those items that have been selected. All I have in this
table are two fields --- a primary key (autonumber ensure unique records)
and a second field which is the record number of the item selected from the
left-hand (primary) table.
I have the program working to the extent that when I double-click a name in
the left-hand listbox, it appears in the right-hand listbox (which gets
requeried to keep the list in alphabetic order). And when I double-click a
name in the right-hand listbox it gets removed from that box.
But what I want to do next is modify the query behind the left-hand listbox
so that the names of those people already selected (and in the right-hand
listbox) don't appear ... they are no longer "eligible".
I already have code to prevent duplicate entries on the right, but I think a
better approach is to not have those people already selected and on the
right to appear on the left. This is somewhat like various programs and how
they handle setting up their tools and Icons on the top of the window ---
the list of available tools/icons is on the left, and the list of the chosen
ones is on the right. Once an item is chosen, it no longer appears on the
left.
Any pointers to a technique for this?
Bob (@Martureo.Org)