currently, i have got code that will let someone search a table in a database and return any possible recordsets into a listbox. however, i would like to be able to click on any of those items added to the list box, so that it will return other data from the chosen record. how would i go about doing this?
skalra63
3
Light Poster
Recommended Answers
Jump to PostDid you look over the VB and Access Thread? In the listbox's on_Click event, you would initiate another query, searching for whatever data you need, and placing the retrieved info into the new text fields (or wherever).
Here is the link: http://www.daniweb.com/techtalkforums/thread26892.html
Jump to PostWell you can get the listbox entry with:
listboxname.list(listboxname.listindex)
So, if for example, you had a listbox named "list1", you could get the highlight item in the list, and save it to a variable named lstdata by saying:
lstdata = list1.list(list1.listindex)
Or am I …
All 6 Replies
Comatose
290
Taboo Programmer
Team Colleague
skalra63
3
Light Poster
skalra63
3
Light Poster
Comatose
290
Taboo Programmer
Team Colleague
skalra63
3
Light Poster
suchisuchi07
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.