D
djc
I have used listboxes before but only with value lists. I used the AddItem
and RemoveItem methods to add and remove items from the list. However now I
have a different use for a listbox. I now want to use a table/query as the
control source. I want to add and remove items from the list box and of
course have that adding and removing also add and remove the actual records
from the table/query. I know the AddItem and RemoveItem methods are only for
value lists.
1) Is there a special way to add/remove items from a list box that uses a
table/query as it's source and have the actual records from the table/query
be added/removed as well?
2) or do I just add a new record to the underlying source and re-query the
listbox to show the new record? On the same note: to remove an item from the
list do I just use the selected item to do a standard ado/dao delete
operation against the underlying source and agian requery the list box
source to show the changes?
I assume the way is number 2 above but I wanted to check to see if there was
some other 'special' builtin/easier method along the lines of the addItem
and removeItem methods for value lists that also just automatically updated
the underlying data as well.
Just want to make sure I'm not doing something the long way!
Thanks in advance.
and RemoveItem methods to add and remove items from the list. However now I
have a different use for a listbox. I now want to use a table/query as the
control source. I want to add and remove items from the list box and of
course have that adding and removing also add and remove the actual records
from the table/query. I know the AddItem and RemoveItem methods are only for
value lists.
1) Is there a special way to add/remove items from a list box that uses a
table/query as it's source and have the actual records from the table/query
be added/removed as well?
2) or do I just add a new record to the underlying source and re-query the
listbox to show the new record? On the same note: to remove an item from the
list do I just use the selected item to do a standard ado/dao delete
operation against the underlying source and agian requery the list box
source to show the changes?
I assume the way is number 2 above but I wanted to check to see if there was
some other 'special' builtin/easier method along the lines of the addItem
and removeItem methods for value lists that also just automatically updated
the underlying data as well.
Just want to make sure I'm not doing something the long way!
Thanks in advance.