Single click doesn't set selected attribute

C

Cheryl

I have a listbox on a form. In the click event, I'm trying
to figure out which item was selected, with the following
code:

Dim varcounter As Integer
For varcounter = 0 To Me!lstProperty.ListCount - 1
If Me!lstProperty.Selected(varcounter) Then
Me!txtDumyNum = Me!lstProperty.Column(4,varcounter)
End If
Next varcounter

The txtDumyNum is never getting set. However, if I paste
this identical code into the double-click event, it works.

Evidently, a single click does not set the
listbox's .selected property.

Is this the way it's supposed to work?

Thanks!

Cheryl
 

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