Easy listbox question

@

-@ marge

Hi,

I have a listbox with 3 columns, and I have an event for
doubleclick on the listbox, but I do not know the syntax
for putting the information in the 3 rows into variables.
Ie: i want the row that they double click on (which
contains 3 columns) to be put into 3 separate variables
(one for each column), I am sure this is easy, but im new
to access and thus am clueless :)
Thanks in advance,

Marge
 
D

Dave Jones

Marge,

The following should do what you want:

Private Sub Listboxname_DblClick(Cancel As Integer)
MyVariable1 = Listboxname.Column(0)
MyVariable2 = Listboxname.Column(2)
MyVariable3 = Listboxname.Column(3)
End Sub

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top