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!

Tell me what column I clicked on in a List Box

Status
Not open for further replies.

dmreda

Technical User
Mar 31, 2004
5
US

Hi,

If I create a list box, and the user clicks on it anywhere, I can get what ROW they clicked on easily enough (using the ListIndex attribute).

However, how can I determine which COLUMN the user clicked in?

Is there an object better suited to this than a listbox?

Thanks,

-dmr
 
Listboxes do not have the ability to determine which column a user clicked on, you can get a column value by the row they clicked on but not what column they clicked. if you wanted to do that then i would suggest you change your list box to a subform displaying your values in a continuous form and then each control on that form has its on onclick property.

 

Hey vbajock,

I'm not familiar with a datagrid object. Can you give me a quick summary? There's nothing in the help files with that name.

Thanks!
-dmreda
 
It's actually a VB6 object. You won't see it in your Access environment unless you have VB6 installed on the development machine. I tried to find a way to download it separately on the web but there seems to be nothing on it. Maybe another tektipper knows how to make it available to Access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top