Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox Unhighlighting items.

Status
Not open for further replies.

MaxEd

Technical User
Jul 3, 2002
407
US
How do you clear out the highlight once all the items in the listbox has been deleted? Also I am having trouble updating the listbox when I delete the items from the table that it is linked to. I've tried requerying after the record has been deleted. Thanks for your help.


-Laughter works miracles.
 
when you delete the items in the table that the listbox is linked to, do you delete the entire record or just the value in the list box field?
you can either code a reset for the listbox setting the value to -1 (maybe using a button on the form to run the code) or edit the field value manually directly in the table setting it to -1

Hope this helps
 
I pull data from a table to fill the listbox then as I delete each item from the table, I delete the items from the listbox as well. I tried refreshing the listbox but when I do successive selection of items to delete I always get the incorrect number of items selected. It even counts the null value as one of the items selected so when I do the delete it deletes items that I didn't even select.

-Laughter works miracles.
 
Nevermind I figured it out. I requeried at the wrong point in the code and it just kept on crapping out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top