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




*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




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Wanna Learn
Hi,

I was wondering if someone could refer an article about manipulating graphics, putting a control transparent and etc. I want to learn about gdi, user32 and the others dlls.

I'll apreciate all the help.



Thanks in advanced,
TRONPR

Wanna Make A Program To Learn Abt Words
Hi

I want to make a program which count the total number of words which can generate by the given words.

Example:

Given word is : Pen

Result should be:

Pen
Pne
Npe
Nep
Epn
Enp


Please any one can help me to do this

Thank you

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.

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?

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

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.

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.

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

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

Anyone Wanna Tell Me How To Load/save Items From A Listview To A File? Plzzzzzzzzzzzz
Anyone wanna tell me how to load/save items from a listview to a file? plzzzzzzzzzzzz

Another One With List View *SOLVED*
I am Sorry to bother you guys again with my problem, but it drives me nuts.

All right,

I have a Form containing three listviews.

If the User clicks a button, i need to know which listview has the selected Item.

I tryd this but it doesn`t work:


VB Code:
If listview.SelectedItem.text <> "" ThenMsgBox listview.SelectedItem.textElseIf listview2.SelectedItem.text <> "" ThenMsgBox listview2.SelectedItem.textElseIf listview3.SelectedItem.text <> "" ThenMsgBox listview3.SelectedItem.textElseMsgBox "Please Choose an Entry"End If


Thanx in advance,


Stephan

List-View Error! **SOLVED**
OK folks, heres another one i cant figure out:

I have a form which contains three ListViews.

I used the gotFocus method to perform some action. Every thing works fine, while I have the ListViews filled with data.

But if my ListViews have no Data at all, the got focus method always creates an error:

Heres my sourcecode:


VB Code:
Private Sub lstview_GotFocus() On Error GoTo lstview_GotFocus_Err: focus = "lstview" ' focus is a Form variable lstview_GotFocus_Err:    'Critical Error    giRC = CriticalMsgBox(Err.Number, Err.Description, Me.Name & "_lstview_GotFocus") ' this is a function which contains the actual msgbox End Sub


Does anyone know why this function runs into the error-clause?

Thanx in advance;


Stephan

List View! An Easy One! * Solved *
I am a little emberrased to even ask this question, but I just cant figure it out myselfe.

I have a ListView with a couple of entrys.

What I want to do is, that the User is not able to change the value of an entry, but still is able to select it!


VB Code:
lstmylist.FullRowSelect = Truelstmylist.Enabled = False ' this one is not correct  


Please give me a hand on this one!


Thanx in advance

Stephan

In Crystal Report, Report Is Viewed But Doesnot View Next Page Or Not Any Message Display!
in crystal report, report is viewed but doesn't view next page or not any message display! and surprisingly page no is increased infinitely (up to no limit!, I have checked up to 400+) but next page was not displayed! if I print report , only 1st page is print!

In this report , I have attached 6 subreports!

I hope anybody reply about my problem

View Of Software Development Technic In Vb6 {SOLVED}
hi...i realised this is an "out of question" question...

im just revising on software developing technic on vb6...
just want u guys opininon whats the best methode on deloping a vb6 software....
as eg...the best technic on developing a web based technic like vb.net is UML...(unified modelling languange...)
so what is for structured based such vb6...
happy to hear from u guys...




______________________________________________
Me And MySelf->The world are richer than we thought...
----------------------------------------------------------------

Edited by - Shatred on 1/30/2005 2:34:27 PM

[solved]A Standard Menu Bar (File, Edit, View, Ect)
How could I make one for vb 6?

I'm pretty sure there is one in .NET in the toolbox that you can just add and go, but I dont know if there even is one for vb6 and if there is, I can't find it. Help would be much appreciated. Thanks.



Edited by - Dieten on 3/24/2006 7:22:22 AM

[SOLVED] Tree View Control - Index Out Of Bound ERROR
When I run the Tree View control I'm getting a - Run time error 35600 Index Out of Bounds - when I choose some fields to view ... not with all. This is the part of the code where I get the error and don't know why..... I tried changing data type - no results.... I'm stuck.

Code:Private Sub mnuSelField_Click()
Call PopluateListView("Select " & TreeView1.SelectedItem.Text & " from [" & TableView1.SelectedItem.Text & "]", FrmView.ListView1)
FrmView.ListView1.ColumnHeaders.Item(1).Width = 5000 <This is where I get the error Width returns a value = 0
FrmView.Show
End Sub

I'm reading records from an Access 2002 Database - VB6

vbprog1144



Edited by - vbprog1144 on 2/14/2004 4:09:26 PM

Listview && Tree View
I have a Tree view and a List view. I have designed something like Windows Explorer. What i want to do is to be able to resize them by using Mouse inbetween the Treeview & Listview.

Please advise.

Can Anyone Help Me? ListView To View The Database
CAn anyone help me? can i used the listview to view a database?

View Thumbnails In Listview ?
Can you view the thumbnails of a Dir picture contents in a listview control or any other control for that matter ?

&lt;?&gt; Listview Icon View
Code:
'question:
'I load my listview and I use 2 different icons
'one for odd numbers, one for even. No Problem
'
I can then view my listview by LargeIcon,SmallIcon,List,Report
No Problem
However, when viewing largeicon I only get one icon
All the rest show me the 2 different icons.

There obviously is a reason...someone what to impart
that bit of knowledge on me.

'load an array with information
Dim myArr(99)
Dim i As Integer
For i = 1 To 99
myArr(i) = CInt(Rnd * 99)
Next i

'then load the array into a listview

Dim x As Variant 'differ between odd and even rows

For i = 1 To 99
'used different images every second line
'image one for odd, image2 for even
x = i / 2
If x Like "*.*" Then
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 1)
Else
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 2)
End If
'add subitems
sItem.SubItems(1) = "905-444-9455"
sItem.SubItems(2) = "who knows"
Next i

Listview: View An Item On The Top
Hi vbFriends !!!

I have a ListView control (Report mode) and it has a lot of items.

When I search for an item and use EnsureVisible method, it usually happens that the item is shown as the last item in the listview's area.

I would like the item to be shown on the top of the listview's area, so that is much more comfortable for the user to see it.

Any hint that could help me?

Thank you in advance !!!

P.S.: here's an example:

My ListView:
-------------------------------
| 1 |
| 2 |
| 3 |
| 4 |
|found item shown here|
-------------------------------

But:
-------------------------------
| I want it here ! |
| 6 |
| 7 |
| 8 |
| 9 |
-------------------------------

How To Right Click In The Listview? (Solved With Thanks)
in the listview events i see no right click event, i see click and double click, is it possible to use a right click event and even a center click event (mouse wheel)

ListView Help:[Finally Solved]
Okay, i finally figured out the dang listview.

Im using this to add them to it:


VB Code:
Xs() = Split(buff, ",")    For i = 0 To UBound(Xs)        DoEvents            List1.AddItem (Xs(i))           ListView1.ListItems.Add , , (Xs(i))    Next i


Okay, this adds, but i want the rows to look like a listboxes rows, not stupid floaty things...also how do i make it so you cant drag them?

Looping Though A Listview (solved)
cant seem to find a tutorial on what im trying to achive.

I have a cost value at the end of each line in a listview, i want to loop thought the listview adding the value to a running total as i go.

Listviews confuse me somtimes

ListView Question *SOLVED*
A simple question but how do you check if a listview is empty or not? I tried ListView1 = "" but no luck.

Thanks.

Get Next Item In A Listview [SOLVED]
What i want is similar to what most other MP3 players I've seen do.

They have buttons that will let you skip to the next song or the previous song in a playlist. How do you get the Listview to do that?

Let's say I have a listview with two items.

Item1
Item2

If item 1 is selected, I should be able to click a button, and get Item 2 to play. And if Item 2 is selected, I should be able to click a separate button to get Item 1 to play.

Here's what bit of code I do have:


VB Code:
Private Sub cmdNextSong_Click()    On Error GoTo LastItem    MediaPlayer1.Stop    ProgressBar1.Value = 0    'Something goes here.LastItem:    Exit SubEnd Sub

Listview Problem(SOLVED)
Hello everybody,

I've a question about listview, I'm new with it(with everything of VB I think) and I get an error in listview.I use this code:
 Code:Private Sub Command1_Click()
    'SQL query assuming there is a Table names Grondtemp
    strSQL = "SELECT AVG(valencia),AVG(Tampa),AVG(Dordogne),AVG(Harlekijn) FROM grondtemp WHERE jaar = '2004' And week = '11' And Dag = '1'"
    'Re-Set the Recordset variable
    Set RsGrondtemp = New ADODB.Recordset
    
    'Clear the ListBox every time Button is pressed
    Me.ListView1.ListItems.Clear
    
    'Populate the Recordset with the above Query
    RsGrondtemp.Open strSQL, dbGrondTempDatabase, adOpenKeyset, adLockBatchOptimistic, adCmdText
    
    'If the recordset pointer is not at the End Of File
    'This means if the Recordset pointer is at the EOF then the query returned no Records
    If Not RsGrondtemp.EOF Then
        RowIndex = 1
        RsGrondtemp.MoveFirst 'Move to the First record
        Do While Not RsGrondtemp.EOF 'Do while it is not EOF
            With Me.ListView1
                Me.ListView1.ListItems.Add , , RsGrondtemp(1)
                Me.ListView1.ListItems(RowIndex).ListSubItems.Add , , RsGrondtemp(2)
                Me.ListView1.ListItems(RowIndex).ListSubItems.Add , , RsGrondtemp(3)
                Me.ListView1.ListItems(RowIndex).ListSubItems.Add , , RsGrondtemp(4)
              End With
            
            RowIndex = RowIndex + 1
            RsGrondtemp.MoveNext 'Move to the next record
        Loop 'Loop till the condition is met
    End If
    RsGrondtemp.Close 'Close the Recordset
    Set RsGrondtemp = Nothing 'Clear the recordset from memory
End Sub
And everytime I get a problem with (rowindex) rsGrondtemp(4),
But to be sure, I don't know for sure if it's listview but everything else works fine and only when use RsGrtondtemp(4) or AVG(Harlekijn) it's bad.
I hope someone can help or give me an other(better) way to show my data in VB.
Thanks,

Erik Koole

ps is there some faq on this forum about listview, I can't find it?



Edited by - yertle on 3/20/2004 7:15:22 AM

ListView Problem. Pls Help(SOLVED)
Hi guys.

I have a vb application which loads all the records of my database in the listview and that's working fine. What i want to happen is when the user click the button it will only load the record with A value in STATUS field. I have the code below. Pls Help me.

Public cnn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset


Code:Private Sub Form_Load()
Dim path As String

path = App.path & "LoginCheck.mdb"
cnn.Open "provider = microsoft.jet.oledb.4.0;persist security info=false;data source = " & path

Set rs = New ADODB.Recordset 'When the form laod, it will load all the records in the access db
rs.Open "Select * From MELOAD", cnn


Call AddColHeaders
Call FillListview

End Sub
Code:Private Sub FillListview()

Dim lstItem As ListItem

While Not rs.EOF
   
    With lvwEload
        Set lstItem = .ListItems.Add(, , rs("FMEMNR"))
        lstItem.SubItems(1) = "" & rs("FNAME")
        lstItem.SubItems(2) = "" & rs("FMOBILE")
        lstItem.SubItems(3) = "" & rs("FAMOUNT")
        lstItem.SubItems(4) = "" & rs("FPIN2")
        lstItem.SubItems(5) = "" & rs("FSTATUS")
        lstItem.SubItems(6) = "" & rs("FDATE")
        lstItem.SubItems(7) = "" & rs("FMESSAGE1")
        lstItem.SubItems(8) = "" & rs("FREMARKS1")
    End With

    rs.MoveNext

Wend

rs.Close
Set rs = Nothing

End Sub
Code:Private Sub lvwEload_DblClick()

If Not lvwEload.SelectedItem Is Nothing Then
    frmUpdate.Text1 = lvwEload.SelectedItem.Text
    frmUpdate.Text2 = lvwEload.SelectedItem.ListSubItems(1).Text 'first subitem

    frmUpdate.Show 1
End If

End Sub


Code:Private Sub Toolbar1_ButtonClick(ByVal Button1 As MSComctlLib.Button)

Select Case Button1.Key

Case "Approved"
Set rs = New ADODB.Recordset
rs.Open "Select * From MELOAD where FSTATUS = 'A'", cnn
Call FillListview

Case "report"
Load report
report.Show 1

Case "Waiting"
Set rs = New ADODB.Recordset
rs.Open "Select * From MELOAD where FSTATUS = 'W'", cnn 'This is what im saying
Call FillListview

Case "Exit"
End

End Select
End Sub

What i want to happen is when i click the "Waiting" toolbar it will load all the records with W value in STATUS field.

Hope guys is clear and hope that you can help me too..

regards,
jam




Edited by - Jam_10 on 4/6/2005 6:39:16 PM

Listview Problem Pls Help.. (SOLVED)
Hi guys..

Once again i would like to have an idea. I have a program that load records from the database to listview but i dont have an idea on how to edit each record in the listview. I mean is when the user double click a certain record in the listview, another form will show and loads his record on the textbox and then the user will edit or update his record.
Can you give me a simplest way on how to load records in the listview? Assuming that i have 7 fields in the database access and will be load in the listview and at the same can edit the certain record using double click?

Try to look at the image that i attached..


Tnx in advance


Regards,
James_1100™

Edited by - Jam_10 on 4/5/2005 7:09:19 PM

*solved*repeating Rs In Listview.... Help Plz..
Hi gang!... how is everybody....

i am repeating rs i know why (due to multiple LESTER with the same ENGINE numbers) but i can't figure it out...
Code:If Me.Check3.Value = 1 Then
    Text1 = UCase$(Text1)
Set rs = New ADODB.Recordset 'this will be the rs
   strSQL = strSQL & _
      "SELECT A.*, B.LESTER, B.ENGINE" & _
      " FROM [oems] AS A, DETAILS AS B" & _
      " WHERE A.LESTER = B.LESTER" & _
      " ORDER BY [oem], [mfg] " & _
      ";"
    With rs
   '
      .Open strSQL, oConnection, adOpenStatic, adLockOptimistic, adCmdText
   '
    Do Until .EOF
    If (Text1 = rs("ENGINE")) Then

         strNew = UCase(!OEM) & ":" & UCase(!MFG)
         If strOld <> strNew Then
            strOld = strNew
            Set oLVItem = _
               lv.ListItems.Add(, , !OEM)
            oLVItem.SubItems(1) = (!MFG)
         End If
      
         For Each varField In rs.Fields
         '
            Select Case UCase(varField.Name)
         '
               Case "AEA", "AED", "ASHDOWNS", "BAXTERS", "INGRAMS", _
                  "METCALFE", "OEX", "OZ", "PJL", "WAI"
               '
                  
                     If Not IsNull(varField.Value) Then
                     Set oLVItem1 = _
                        lv.ListItems.Add(, , "" & varField.Value)
                     oLVItem1.SubItems(1) = varField.Name
                  End If
                 
               '
            End Select
         '
         Next varField
      End If
         .MoveNext
      '
      Loop
   '
      .Close
   '
    End With
    

End If
Set rs = Nothing 'clear the rs variable
this part here...Code: Case "AEA", "AED", "ASHDOWNS", "BAXTERS", "INGRAMS", _
                  "METCALFE", "OEX", "OZ", "PJL", "WAI"
  repeats as per picture attached...how can i check the code to see if it has been previously added..??

Any ideas as i tried a few different kinds...




Edited by - Hopeless on 8/25/2004 3:31:31 PM

Listview Columns In List View
I am trying to use Listview to import data from an Access table and I only want to use the list view not the list report. The data imports OK and populates the list OK into (in this case with the quantity of data imported) 4 columns.

Trouble is, all the data is truncated and I can find no way of setting the column widths as you can in the normal list box. I do not have any sub-items, just a single list so I do not need to set up any column headers.

Listview Problems With Arrange And View
Hi

I have couple of issues with my listview control.

a) when I set arrange=lvwautoleft, I expect the coloumn headers to appear vertically on the left hand side. That does not happen.

b) When I set view = lvwicon, lvwsmallicon, or lvwlist, I see nothing in the listview control, only the lvwreport works (I see the image and the text in the colomn header). I have set up the image icon and all the setting etc.

regards

Yamin

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.

Listview(view=lvwreport) Set Colour
In a Listview Report, how can I set colour on a selected ROWs based on inputed data.

e.g. if "Year = 2001" is red colour OR if "Year = 2003" is blue colour.

Thank you in advance

View Thumnail Images In A Listview
Hi All,
I have an image control on a form that shows images to a listview (with checkboxes) I want to be able to check certain ones and display the checked thumbnails only. What is the best way to start? would it be better to have a second image control and a second listview or is there a easier way to do it?
Thanks

2 Questions In ListView (View=3-lvwReport)
Hello every one...
I'm trying to use the ListView control to make something like an Adress Book in my program..So i make 4 columns and i made another form with 4 text boxes to add info to the Adress Book (See the Picture in the Attachement).
- My first question is how can i add info to these 4 columns.
- My second question is how to save info in them (I mean does the Savesettings and Getsettings works with ListView?).

Listview Doubleclick To View Details HELP!!!
I have looked and fumbled for 2 weeks and am admitting total defeat!

I have a database that tracks fleet vehicles.
Access 2k mdb
tblVeh fields:
VehNum
Year
Make
Model
etc1
etc2 (and so on)

I'd like to have a ListView box that shows all the vehicles sorted by VehNum
(which is a owner assigned number). When the user double clicks (or click,
I'm not picky), it would fill in the rest of that record in other fields on
the same (or different) form.

I have gotten the form to come up but can not get it to work otherwise. I'm
ready to trash the existing code (20 lines or so total - so no big loss) and
start fresh with any ideas that you might have.

I'm using ADO code vs the data tool (although I'm not sure why, I was lead
to believe that coe was better than the tools).

I'm looking forward to your assistance and am *very* greatful for any help
that you might provide.

Chris

View Report
hi!!!
Is there any other way to view data from Access DB and put it in the cells in a multiline mode to see the entire content
without using text controls? I tried using MSCOMCONTROL(Listview) and MSHFLEXGRID and had not come up with the right answer. THanks.......

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