List box question?

P

pokdbz

I have a list box which ties to a query. I would like to be able to double
click on one of the entries in the list box and then have it display some
information. The list box I have contains an ID number so how do I make it
so that I use what I highlight in the box to display information on a double
click?
 
J

John Welch

If you double click in the list box, you will be selecting an item at the
same time, so in the double click event of the listbox, you can get the
value of the item selected by just referring to the value of the list box in
visual basic. For example, if you wanted to show a message saying which item
was chosen, you could say:
msgbox "You chose ID Number: " & me.ListBoxName

and you will get a message with the ID number selected in the listbox
Hope this helps.
 
Top