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

Help with ListBox item selection 2

Status
Not open for further replies.

unclesvenno

Programmer
Sep 12, 2004
33
AU
I have a listbox which is populated by a Query. My problem is I am unable to select individual items within the Listbox. I have looked through the different properties and cannot see anything to help with this. Also I have tried implementing a Click event and it doesn't register:

Code:
Private Sub lstOrderedFiles_Click()

    MsgBox "Selected index = " & lstOrderedFiles.ListIndex
    
End Sub

thanks Uncle Svenno
 
Presumably the list box is returning some records to select from. Your Msgbox code is fine. Check the list box's enabled(yes)/locked(no) properties. Otherwise try recreating a list box using the wizard.

Cheers,
Bill
 
Hi Bill,

Thanks for your help. Unfortunately I do have the properties : enabled set to(yes) and locked to (no). I tried to re-create the listbox through the wizard too. Alas I am still stuck. I'm bewildered that i cannot even select a list item. I have another listbox and I can do all the normal things with it. I've looked over the code and property settings and matched it all to be the same! This is driving me nuts!

Thanks again,
Uncle Svenno
 
Woo Hoo, I worked it out. What a clown I must be, I overlooked the fact I had the from properties allow edits, allow deletions, allow additions all set to NO. What a silly uncle I am.

thanks,
Uncle Svenno!
 
List Box Problem: I have a list box that the horizontal scroll bar does not work after I hide the form and then make the form visible again. The list box works fine only if I manually hit the tab button. I have tried to requery oe set focus to the list box after making the main form visible but that does not make any difference. The list box has 8 columns in it with only 5 showing and the bound column has a width of 0.
Any ideas????
 
ha ha ....thank you Uncle Svenno for posting your solution -- it was EXACTLY what I did too! Thanks to you I was only frustrated for 15 minutes or so.

Nutz....must be Friday afternoon. :D


PenelopeC
~~~>-/O~~~~~swimming right along
 
My pleasure PenelopeC, finally I have put something back into the community!

Regards,
Uncle Svenno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top