Solved

Simple ListView question

Posted on 2000-03-02
2
127 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 10 total points
Comment Utility
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
Comment Utility
Simple, concise.....fitted straight into my code

Cheers paulstamp
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now