Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Simple ListView question

Posted on 2000-03-02
2
Medium Priority
?
134 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
[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 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
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…
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

715 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