?
Solved

Selecting Item in ListView Box

Posted on 2002-05-03
4
Medium Priority
?
145 Views
Last Modified: 2010-05-02
I have a search button that I want to search the first column of a listview box.  Once it finds it, I want that row in the listview box highlighted.  Here's what I got so far which works, but does not highlight.  

intX = 1

Do Until ListView1.SelectedItem = Trim(txtSearchDDA.Text)
    ListView1.SelectedItem = ListView1.ListItems.Item(intX)
    intX = intX + 1
Loop
0
Comment
Question by:jackjeckyl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
RichW earned 200 total points
ID: 6989212
Make sure you have the fullrowselect property set to True and the HideSelection property set to False.




0
 

Author Comment

by:jackjeckyl
ID: 6991265
OK, that works.  Is there a way to have it automatically scroll down to the one that is selected?  In other words, if the one that is selected is all the way down the listview box, once it has found it can I have it where it will be shown in the listview box?
0
 

Author Comment

by:jackjeckyl
ID: 6991350
Ahh, EnsureVisible property will do that.  Thanks for your help.
0
 
LVL 4

Expert Comment

by:RichW
ID: 6991565
Sorry I didn't get back sooner.  EE just sent me 12 emails all at one time, so I didn't know you asked another question.

Glad I could help.
RichW
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question