CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    4

    ListView control. How do you extract\update values in report view

    I have populated my ListView control with my values using DAO. I have 10 columns set up in report view. In my code fragment below, I am looking through my listview control searching for rows that the user has selected. Now I need to be able to extract some of the sub values and update others. How do I do this? Here is my code so far.

    Private Sub SelectedCountCommand_Click()
    Dim i As Integer

    For i = 1 To ListView1.ListItems.Count
    If ListView1.ListItems(i).Selected = True Then
    'extract values from col 3 and 4 and subtract them

    'update column 5 based on the results of col 3 minus col 4

    End If
    Next

    End Sub




  2. #2
    Guest

    Re: ListView control. How do you extract\update values in report view

    access the SubItems array of the Listitem as in

    dim item as listitem
    set item = listview1.selecteditem
    item.text refers to first column
    item.subitems(1) refers to second column and so on





  3. #3
    Join Date
    Aug 1999
    Posts
    4

    Re: ListView control. How do you extract\update values in report view

    Thank, I wil try it


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured