Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




ListView (Report View) - Adding Items


AH! This is embarassing yet very frustrating. The last time I worked with the list view control was a loooong time ago. Unfortunately, I lost that project when my computer crashed (no big deal really, the program was never even completed). At any rate, how the heck do I add subitems and items to a report view listview?!

eg
Column 1 Column 2
Add Item Add Item
Add Item Add Item




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help: How To View Selected Items From Listview With Crystal Report Viewer
Hi

I have a Listview with check boxes from it want to view selected items with crystal report viewer.

Private Sub cmdView_Click()
Dim lCustomerId as Long
    Dim tmpItm As ListItem
    For Each tmpItm In lstItems.ListItems
        If tmpItm.Checked = True Then
            lCustomerId = Val(Replace(tmpItm.Key, "C", ""))
          End If
    Next

  End Sub

Plz. help

regards

Adding Items To A Listview (report Style)
hi,

i would like to know.. (ive created 4 columns) how to add items into the different columns. Hope im clear.. thank you very much

lrm91

Adding Items To A Listview Called Report
Hey guys I would like to clean up my listbox and get a listview called report.

I set up the columns like this .

Report.ColumnHeaders.Add , , "Problem Filename", 2000
Report.ColumnHeaders.Add , , "Problem Name", 3000

Report.ColumnHeaders.Add , , "Type of Problem", 3000
Report.ColumnHeaders.Add , , "Severity", 3000
Report.ColumnHeaders.Add , , "Description of Problem", 3000


Is there a way to get it so when I press a button every item in my list 6 is clicked on , one at a time.?

It Is Possible To View Image In The Listview Items?
I have microsoft accesss store image path location in record.I would like to know, it is possible to view image in the listview items from database?for example ".jpg" image file format.

Copy Listview Items To Another List View
Is there a quick way I can copy a list view item to another identical list view (ie having the same columns) without having to copy all the individual components separately. ie. the foreground colour, the icon, the sub items etc.

So basically something like:

set itmTo=lsvTo.ListItems.Add()
itmTo=lsvFrom.ListItems(nFrom)

The above code only copies the .Text property, not all properties.

ListView Adding Items.
Code:
Private Sub Form_Load()

With ListView1
.ColumnHeaders.Add Text:="Server"
.ColumnHeaders.Add Text:="Ram"
.ColumnHeaders.Add Text:="CPU"
.ColumnHeaders.Add Text:="C:"
.ColumnHeaders.Add Text:="Ping"
.View = lvwReport
End With



End Sub
i have this code to give the listview1 5 diffrent columns.

can someone give me the code that when command1 is clicked, it will add a row underneath the columns in this order:

server1
ram1
cpu1
c:1
ping1

just so i know how to do this.

Adding N Items Into ListView
I am using following code to add records read from a text file into a ListView object.


Code:
Dim S
Dim SP
Dim i
Dim LItem As ListItem

i = 1
Open App.Path & "dataspdates.txt" For Input As #1

Do While Not EOF(1)
Line Input #1, S
SP = Split(S, "+", , vbTextCompare)

Set LItem = ListView1.ListItems.Add(, , SP(0))
LItem.SubItems(1) = SP(1)
i = i + 1
Loop
Close #1
My ListView Control has just two columns, and the text file contains records like:

3/10/04+Mr.D Birthday
6/1/04+Mr.C.Anniversary

In the above code, SP will store the splitted line read from the file. The problem is that the above code displays an error "Subscript out of range", at the line starting with "Set LItem".
How to keep adding records to ListView till EOF.

Adding Items To A Listview
I have searched thru the forum, just cant find what im looking for. this is the layout of my listview

Fkey | Action


I wish to add items to the fkey column, and also text to the action clolumn.
listview1.ListItems.Add.Text = "blah" <-- i tried that, but that only goes in Fkey...

How would i do this please,

Thanks

Adding Items To Listview + Ram
Im adding alot of items to a listview (probably 20k rows, 11 columns)

Also, I'm a reporticon and a smallicon to the listview at the same time. Is this grounds enough for the ram that it takes up? It grows by 100k every couple of seconds ( at about 3k rows it has 30mb of ram)

Or is my program leaking by chance?

Adding N Items Into ListView
I am using following code to add records read from a text file into a ListView object.


Code:
Dim S
Dim SP
Dim i
Dim LItem As ListItem

i = 1
Open App.Path & "dataspdates.txt" For Input As #1

Do While Not EOF(1)
Line Input #1, S
SP = Split(S, "+", , vbTextCompare)

Set LItem = ListView1.ListItems.Add(, , SP(0))
LItem.SubItems(1) = SP(1)
i = i + 1
Loop
Close #1


My ListView Control has just two columns, and the text file contains records like:

3/10/04+Mr.D Birthday
6/1/04+Mr.C.Anniversary

In the above code, SP will store the splitted line read from the file. The problem is that the above code displays an error "Subscript out of range", at the line starting with "Set LItem".
How to keep adding records to ListView till EOF.

Listview Adding Items?
is there a way to make it so when adding items to the listview, it will know to go to the next line if there's already data on the previous line? here's my code of what i have so far, but sometimes it adds blank spaces to the listview control, and i dont even know why.


Code:
Label1.Caption = Label1.Caption + 1
Dim lstEntry As ListItem
ListView2.ListItems.Add , , Label1.Caption
ListView2.ListItems.Item(Label1.Caption + 1).SubItems(1) = txtName
ListView2.ListItems.Item(Label1.Caption + 1).SubItems(2) = TxtLName

Adding Items To Listview...
..whats the deal with it? I only want to add say 4 columns, and under each column about 5 items. But there seems to be no way that i have tried to get it to work.

Thanks for any help

Adding Items To Listview?
I have a listview on my form, and on load I tried this:

ListView1.Items.Add("List item text", 3) 'From MSDN

it does not work, so how do I add rows to the listview (report style).

*I got it from "Microsoft Windows Common Controls 6.0 (SP4)

Do I maybe need a newer SP or something...?

Adding Items To Listview Box
Can someone please show me how to select an item from a listview box and add it to another listview box. Both listview boxes have three columns.

Adding Items To A Listview Box
Is it possible to add items to a ListView Box from another ListView box using a command button ? If so can someone show mw an example please ?

(My listview box contains 3 columns).

Listview (adding Items)
this keeps giving me an error on the "listview1.listitems.add file" line, please help:

------------------------------------------------------
File = text1.text
Open App.Path & "/list.txt" For Input As 1
Do Until EOF(1)
Line Input #1, File
ListView1.ListItems.Add File
DoEvents
Loop
Close 1
------------------------------------------------------

I am probably doing this the completely wrong way, but I am used to using listbox's.

LISTVIEW - Adding Items... How???
Hey,

Just wonderin' if anybody has any coding for adding to a LISTVIEW control...

Other coding for the LISTVIEW would be good to, but please post coding on how to add items.

Adding Items To Listview ...
When i add items to listview ... my forms get "disabled" or at least i cannot click any button on the form or anything
another question: how do i stop a function for example if i want to stop the additems function ...

thanks,

More Listview Questions - Adding Items
Code:
Set itmx = ListView1.ListItems.Add(, , quantity)
itmx.SubItems(1) = itemnumber
itmx.SubItems(2) = description
itmx.SubItems(3) = price
itmx.SubItems(4) = total

what are the two comas for in the first line? .Add(, , quantity)

and im ending up with an extra cell at the end with this code, anyone know why? and how can i preset certain sizes for each cell/column? i want description a little longer than the others


Code:
Dim itmx As ListItem
Dim colx As ColumnHeader

Set colx = ListView1.ColumnHeaders.Add(, , "Quantity")
Set colx = ListView1.ColumnHeaders.Add(, , "Item Number")
Set colx = ListView1.ColumnHeaders.Add(, , "Description")
Set colx = ListView1.ColumnHeaders.Add(, , "Price Each")
Set colx = ListView1.ColumnHeaders.Add(, , "Total")

ListView1.View = lvwReport

Adding Items To ListView (comctl32.ocx)
Ok, I've been using mscomctl.ocx for my ListView. However, by accident I discovered that comctl32.ocx uses the XP theme when called upon, and the mscomctl.ocx does not.

So I figured it would be as easy as swapping my controls... nope. I am continually getting Type mismatch errors when I use this code:


Code:
Set litem = frmMain.lstFuel.ListItems.Add(, , Trim(fuelrs.Fields(0)))
litem.ListSubItems.Add , , Trim(fuelrs.Fields(2))
litem.ListSubItems.Add , , Trim(fuelrs.Fields(3))
litem.ListSubItems.Add , , Trim(fuelrs.Fields(4))
litem.ListSubItems.Add , , Trim(fuelrs.Fields(5))
It errors on the first line. What is going on?!

Adding All Items From A Listview To A Listbox?
Hey guys I have two forms.

The antivirus form has a listview called report.

I have another form called antiignore that has a list1 listbox. Is there a way to get it so when I load the antiignore form, the items that are in the listview report goes in the list1?

Thank you!

Adding Array Items To Listview
Hi,

Can somebody please tell me how to add an array student(i) to a listbox Listbox1 ?

Im struggling with this as i usually work with listboxes but i want to be able to change the listview values icons dynamically depending upon an excel range.

Thanks,

Dan

Listview - Adding Items Problem
Hi,

Can anyone please assist me with the following question.

I have a listview and its view is set as lvwreport.

My problem is with the listview. When I click on a data item in the listview, and then try to add data it seems to mix up my data.

For example. (Listview data)

I have 2 columns

Name Age
John 22
Alan 21
Fay 23

If I select say Alan and then try to add data, my program then seems to add the name to where the location of where alan is and adds then age to where Johns age is. Name to add will be Kirsty , age of 25

Example of output
Name Age
John 25 (kirsty's age ends up here)
Kirsty (data missing)
Alan 21
Fay 23

Part of the source code is;

With lstUsers.ListItems
.add (1), , TxtName
.Item(1).SubItems(1) = txtAge
End With


I have also tried this;

dim a as integer

a = lstprocess.ListItems.Count

With lstUsers.ListItems
.add (a), , TxtName
.Item(a).SubItems(a) = txtAge
End With

Can anyone please explain why this is happening, and how can I go about getting the data entered in correctly. Also I would appreciate it if someone could also advise in how I can get the data showing in ascending order, once the name and age has been entered.

Any help is appreciated.

Thanks.
Al.

Adding Items In Columns In A Listview
Hello

I am using a listview control that l want to add items to. The Listview contains 2 columns. One for name and the other for price. The name and price will be input by using a text box. When the user presses the command button the 2 will be added to the listview box.

I am not sure how to add 2 items into the two columns.

My code so far.


Code:

'Create the listview headings
ListView1.ColumnHeaders.Add , , "Name of Fruit"
ListView1.ColumnHeaders.Add , , "Price of Fruit"
ListView1.View = lvwReport

'Code adding to the listview box, but not sure how to add price
Set objfruit = ListView1.ListItems.Add(, , name.Text)



Many thanks in advance

Steve

**RESOLVED**Adding Items To ListView
I have a Table with two fields: Item Name & Item Price...would like to add all the items that are there in these two tables...I wanna create two columns in ListView and...add...any help!!!

Adding Items To ListView Control???
Hello!!

I have a ListView control woth 2 columns namely "Code" and "Description " respectively.

How do i add items the ListView Control programatically.

thanx

Getting Error In Adding Items To Listview
i am getting error in adding listview items.it says that i have to attach
the imagelist to the listview first before adding the items. ia m trying to
add the items of recordset into the listview. and another problem is there
if i am opening list view in report mode then i am not getting the
checkboxes.....please solve it..its urgent.
my code is as follow..

Private Sub Command1_Click()
Dim litem As ListItem

Adodc1.Refresh
Adodc1.Recordset.MoveFirst
With Adodc1.Recordset
While Not .EOF
Set litem = ListView1.ListItems.Add(, , .Fields(1), 1)
litem.SubItems(1) = .Fields(2)
litem.SubItems(2) = .Fields(3)
litem.SubItems(3) = .Fields(4)
litem.SubItems(4) = .Fields(5)
litem.SubItems(5) = .Fields(8)
.MoveNext
Wend
End With
End Sub

Private Sub Form_Load()
Dim lheader As ColumnHeader
Dim litem As ListItem

ListView1.Icons = Nothing
lwidth = ListView1.Width - 6 * Screen.TwipsPerPixelX
ListView1.ColumnHeaders.Add 1, , "Subkapan", lwidth / 6, , ColumnHeader
ListView1.ColumnHeaders.Add 2, , "lot no", lwidth / 6, , ColumnHeader
ListView1.ColumnHeaders.Add 3, , "than", lwidth / 6, , ColumnHeader
ListView1.ColumnHeaders.Add 4, , "weight", lwidth / 6, , ColumnHeader
ListView1.ColumnHeaders.Add 5, , "quality", lwidth / 6, , ColumnHeader
ListView1.ColumnHeaders.Add 6, , "expected_per", lwidth / 6, ,
ColumnHeader
ListView1.View = lvwReport



End Sub

Adding Items To Listview In Reverse Order
can anyone tell me how i can add items to a listview so the new item you are adding is at the top of the list, rather than at the bottom? i want the oldest/ first item added at the bottom, with the newest item always at the top of the list.

any help would be greatly appreciated.

gkc

Help About ListView Report View
How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.

Adding Items To Listview From Different Sets Of Text And Combo Boxes..
I am making a PC inventory system.

So here's what I am trying to do.. I am trying to add items from different sets of
text and combo boxes to a single listview, the columnheader set of the listview also change depending on the item selected on the listbox.

Listbox containing the hardware type, as we all know different hardware types has a different specs, for example a RAM that has a type, name of the ram, brand, RAM size and a Modem that has a only a modem name, brand..

Changing the columnheader set is working fine as the text and combo boxes that available when a specific hardware item is selected, now I am making a hard time putting the items on the listbox..

Its not like a code problem, but kinda logical one..

your help is always appreciated..

thanks in advance

Listview - Report View With Icons?
Is it true that is you have the listview's view set to 3 (lvwReport) that it can't show icons?

I have a imagelist on a form with a picture in it. The picture has a key. I set the listview's icons and small icons to this imagelist. I tryed to add the picture to a listview menu item and used its key.

Didn't work. Any suggestions?

Listview + Report View + Colour
Can I make subitems have different backcolors or forecolors to them?

Right To Left ListView? (Report View)
I've tried implementing a right-aligned listview (comctl 6.0), but without any effect.
The listview is in report view mode.
Running WinXP. Shell language is Hebrew.

Code:
OldExStyle = GetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE)
OldExStyle = SetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE, OldExStyle _
Or WS_EX_LEFTSCROLLBAR Or WS_EX_RIGHT Or WS_EX_RTLREADING)
There is no apparent change to the listview, even though the call succeeds.

Does anyone have a solution?

ListView (Report View) Troubles...
I have a list view that can contain alot, a few, or no values at all at any given time.
The box will display existing information in row 1, then in row 2 it will display the information that will overwrite the existing information (if the user chooses). Then the 3rd will be existing, 4th new, 5th existing, 6th new, etc...

The grid goes in pairs, and the check boxes are turned on. By default nothing is checked. I want the user to be able to click whatever they choose, if they check the box on an odd row, then all the text in every cell of that row will go bold, and the entire row after that cell will lose its bold font (incase it was selected before). The rows look like this:

1 asdfas as as dasdfasf asdf
1 asdf asf asdf asdf asd fasf asd
2 asf asdf asdf asf asf asdf asdf
2 asf asd fasdf asd fasdf asdf asdf
3 asdf asdf asf asf asdf asdf asdf
3 asdf asdf adsf adsf as fasd
4 adsf asdf sdf asf sa dfas fasdf as
4 asdfasdfa sdf asdf as fafs

Of course with check boxes to the left of the numbers, if i click the 2 on the bottom, it will go bold and the 2 above it will be unchecked and go back to non-bold font. I know this is possible, im pretty close already.. Here's what i have:


Code:
Private Sub lvConflicts_ItemCheck(ByVal Item As MSComctlLib.ListItem)
Dim MyCount As Integer
If Item.Checked = True Then
Item.Bold = True
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = True
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index + 1).Checked = False
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index - 1).Checked = False
End Select
Next MyCount
Else
Item.Bold = False
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = False
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
End Select
Next MyCount
End If
End Sub


Im practically doing it already, i know it.. I think im just thinking too hard.. ive been working too long on this

Listview (report View) Scrollbars
I can't seem to figure this out: how do I add vertical and horizontal scroll bars to a Listview control with its "View" property set to "lvwReport"? I have tried many thing ... but none seem to work.

Icons In Listview In Report View
Hi, I am having trouble trying to display icons in a listview. I am displaying the listview in report mode and I have all the imagelists properly bound. If im not mistaken, the icons used in the report view use the 'small' imagelist, correct? Anyway I am populating the imagelist by creating a ListItem variable and setting it to Listview1.Add each time through the loop. Could this be the problem?

Listview Report Moving Items Up && Down
Hi everyone ,

I know how to move the first column field up and down in a listview report.

But now i have 10 columns and the user wants to select a row and puts it one down (if its not already at the bottom) or one up (if its not already at the top).

thx

Moving Columns On A Listview (Report View)
I want to programmatically set the Position of the columns in a list view.

This is an "after thought" so I am trying to do it on already loaded listviews.


I see from a little experimentation that I can easily move the column headers by simply changing the .position property.

But that does not bring over the data for that column. (Just the header)

Do I have to manually move the data or there an easier way?


(By "manually move the data" I mean set up a temp array, copy the column's data, update new column after moving other column into original col number)


Regards,

ListView Report Mode View - RESOLVED
When I change to report mode view nothing is showing up in my listview. When I change it to List view my data shows up. Any ideas?


VB Code:
Private Sub LoadTableSpecs()        Dim oSQLServer As New SQLDMO.SQLServer    Dim oSQLDatabase As New SQLDMO.Database    Dim oSQLTable As New SQLDMO.Table    Dim oSQLColumn As New SQLDMO.Column        Dim i As Integer    Dim liObject As ListItem        ListView1.ListItems.Clear        oSQLServer.LoginSecure = True    oSQLServer.Connect Form1.cboServer1.Text    Set oSQLDatabase = oSQLServer.Databases(Form1.cboDatabase1.Text)    Set oSQLTable = oSQLDatabase.Tables(Form1.cboTable1.Text)        For Each oSQLColumn In oSQLTable.Columns                Set liObject = ListView1.ListItems.Add(, , oSQLColumn.Name)        liObject.SubItems.Add , , oSQLColumn.Datatype        liObject.SubItems.Add , , oSQLColumn.Length        Set liObject = Nothin        Next    oSQLServer.DisConnectSet oSQLServer = NothingEnd Sub

ListView (Report View) Numeric Sorting
Hi,

I have a listview control in report view, and I have it so that when I click on a columnheader it sorts the list items by that column, the problem is that when I do that on a numeric column its sorts it like this

1
11
2
3
3100
4
...

I was wondering how can I make it so it sorts the column correctly

1
2
3
4
11
3100

Let me know if you know a way

Thanks In Advance,

Zmei



Edited by - Zmei2004 on 8/29/2004 8:45:42 AM

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

Exporting A Listview Items To Crystal Report
hi, can anyone knows how to export a 'listview' table from vb application to a report, i am using 'crystal reports 8.5'?

How To Add A Thumbnail To A ListView Subitems That Will View In Report Format?
How to add a thumbnail to a ListView subitems that will view in report format?

Editing Selected Item In ListView In Report View
How can I edit the second column of data in a listview control? I am making a properties box much like the one you use in VB. The first column information for each item can not be editable but the second column is going to be the value for each item and I need for it to be able to click and type in it just like in VB (or at least similar to that).

Any help and sample code is appreciated. Thanks.

*solved*I Wanna Learn ListView In Report View
hi this is a new thread after advice on moving from Picture1 to now i believe ListView in Report view is the way to go.

Metallisoft can you help me get his going. I have attached form1 to download and change as i can't get it to work. your reference click here hasnt helped me as it gave me 3 values i only need 2

Database eg
Quote:UNIVERSAL    OEM    MFG
16190    2-1428-HI    WAI
16190    SJ-0001R    AIM
16190    91-25-1030    WILSON
16190    S9024    LUCAS REMAN
16190    9821006350    ISUZU
16190    9821006060    ISUZU
16190    S114-136    HITACHI
16190    S114-100    HITACHI
16190    SR198X    BOSCH REMAN
16190    94022494    GENERAL MOTORS
16190    RXS056    OEX
16190    94021044    GENERAL MOTORS
16190    S114-118    HITACHI I Don't need to display the UNIVERSAL Numbers Just OEM anf MFG only

Code:Private Sub Command3_Click()
Set rs = New ADODB.Recordset 'this will be the rs
Dim strSQL As String 'this the source
         
'make the selection string: filter the records right away
strSQL = "SELECT C.* FROM OEMS AS C where UNIVERSAL in(select UNIVERSAL from OEMS where oem='" & UCase$(Text1) & "')"
                       
' To hold a reference to the current Listitem (row).
Dim oLVItem As MSComctlLib.ListItem

' The (Listview.Width - 350) / 3 simply adjusts the column
' widths to 1/3 the width of the Listview (subtracting the
' width of the scrollbar)
' ListView.ColumnHeaders.Add , , "Supplier", (ListView.Width - 350) / 3 '<- Don't need to work?
ListView.ColumnHeaders.Add , , "OEM", (ListView.Width - 350) / 3
ListView.ColumnHeaders.Add , , "Manufacturer", (ListView.Width - 350) / 3

        
        
        Picture1.Cls
        Picture1.FontSize = 8
        Picture1.Font.Bold = True
        Picture1.Print ">> Supplier Information"
        Picture1.Font.Bold = False
        Picture1.Print "OEM:"; Tab(20); "Manufacturer:"

    rs.Open strSQL, oConnection, adOpenStatic, adLockOptimistic, adCmdText
     
'loop through the recordset
    Do Until rs.EOF
        M19 = rs("OEM") 'Are m19 and m20 properties or local variables? didn't want to take them out, but if they are global settings and there are more records, they will only 'remember' the values in the last record.(No they are strings in a database)
        M20 = rs("MFG")
     
        Picture1.Print M19; Tab(20); M20
        rs.MoveNext
    Loop
     
    rs.Close 'Close the recordset never leave it open!
    Set rs = Nothing 'clear the rs variable

End Sub
  OK NOW how do i replace the Picture1 to ListView in Report view after reading MSDN click here CAN anyone save me? the ColumnHeaders don't display too?





Edited by - Hopeless on 6/4/2004 12:16:16 AM

ListView Control. How Do You Extractupdate 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

Adding Icons To A Listview Report Style
Someone can tell me a little bit how to add icons at each line of a listview int report style ?
Just explain it fast ... I should understand ..

thanks

How To Populate A ListView From A DB Adding Column Headings In Report Style?
I'm currently using ADO to connect to my DB. I want to populate a ListView(Report)with data from a table chosen from a CommonDial. but i don' know how to assign the ColumnHeadings as well as add the data. I want my program to be able to file out all the info in the ListView automaticaly once opened.(Tables I no nothing about?!?)

Copyright © 2005-08 www.BigResource.com, All rights reserved