Hello, My problem is that when i try to see other datails of the person names selected in the list box, i can see the details of the firstname (first item) of the list box only and not the second onwards. So pl tell me the code to write so that I may select any names from the list box. I am using VB 6 and Access with ADODB connection.

try to post the code you have started..

rs. open " Select * from <table name> where name ='" & list1.text & "'",cn, adopenstatic, adlockoptimistic

and suppose the list box items are
-1. Mohan
2. Sohan
3. Rohan
When I click on Sohan or Rohan i.e. on item 2 or item 3 the programme does not respond despite having data in the table.
so how to write the code so that it should respond on selecting every
item in the list box.

try to use list1.list(list1.listindex) in pace of list1.text

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.