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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double-click event for list boxes

Status
Not open for further replies.

Carthesis

Technical User
Oct 29, 2002
100
GB
Afternoon all.

I'm looking for a way to use the double-click event in a list box. I've got 2 list-boxes on a form that each list subordinates to the logged-in user. The subordinates are sorted by different criteria, so it's important that they're in the 2 boxes. Each listbox lists a name and an email address.

I'd like to be able to double-click on a selected entry, and have the DB open a form containing some other information. However, using the Double-click event for the listbox means it'll do whatever the code tells it to even if you click on 'empty space' in the listbox. Obviously, it could be done by having a 'click to open info' button, but it'd be much nicer if you could just double-click on the entry in the list box I think.

I've seen this done in a sample database somewhere, and I'm sure I'm not imagining this, but sadly I can't find it again.

Any ideas?


Cheers.
 
Test the value of the listbox in the double click event procedure.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hmm.

Should work. Just wish I could remember where that other DB was on the InterTubes.

Bit stupid that the OnClick event is anywhere on the listbox rather than just the selected items if you ask me, but that's MS for you!

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top