Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple ListView question

Posted on 2000-03-02
2
Medium Priority
?
136 Views
Last Modified: 2010-05-02
I've got a database returning data to a Listbox, and I want to take the contents of the ListBox and display them in a ListView

Can somebody supply me with the code

Cheers,

Matt.
0
Comment
Question by:Matt_Unsworth
2 Comments
 
LVL 3

Accepted Solution

by:
paulstamp earned 40 total points
ID: 2577258
Assuming list1 and listview1 are the two controls :

    Dim nCount As Integer
   
    ListView1.View = lvwList
   
    If List1.ListCount > 0 Then
        For nCount = 0 To List1.ListCount - 1
            ListView1.ListItems.Add , , List1.List(nCount)
        Next nCount
    End If


That should do the trick
0
 

Author Comment

by:Matt_Unsworth
ID: 2579402
Simple, concise.....fitted straight into my code

Cheers paulstamp
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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

916 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