Results 1 to 14 of 14

Thread: VB6 ListView don't view (Combo Box)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    VB6 ListView don't view (Combo Box)

    it's not viewing what it suppose to view.

    Code:
    Private Sub Command1_Click()
    Unload Me
    End Sub
    
    Private Sub Form_Load()
    'Vendosja e Furnizuesve ne Combo Box
    Call dbconek
    ar.Open "Select *From tblFurnizuesit", strConek, adOpenStatic, adLockOptimistic
    If ar.RecordCount = 0 Then
    Exit Sub
    Else
    ar.MoveFirst
    Do While Not ar.EOF
    txtfurnizuesi.AddItem ar!furnizuesi
    ar.MoveNext
    Loop
    ar.Close
    End If
    End Sub
    
    Private Sub txtfurnizuesi_Click()
    lv.ListItems.Clear
    txttotal.Text = ""
    Dim rtotal As Currency
    Call dbconek
    ac.Open strConek
    With ar
    criteria = "Select * From tblFurnizimi Where furnizuesi like'" & txtfurnizuesi & "%'"
    .Open criteria, strConek, adOpenStatic, adLockOptimistic
    Do While Not .EOF
    lv.ListItems.Add , , !pershkrimi, 1, 1
    lv.ListItems(lv.ListItems.Count).SubItems(1) = Format(!qmimi, "###,###,##0.00")
    lv.ListItems(lv.ListItems.Count).SubItems(2) = !sasia
    lv.ListItems(lv.ListItems.Count).SubItems(3) = Format(!total, "###,###,##0.00")
    lv.ListItems(lv.ListItems.Count).SubItems(4) = !Data
    lv.ListItems(lv.ListItems.Count).SubItems(5) = !furnizuesi
    .MoveNext
    Loop
    .Close
    End With
    '=============Paraqitja e Infos
    Call dbconek
    ac.Open strConek
    With ar
    criteria = "Select * From tblFatura Where fat_nr like'" & Text1 & "%'"
    .Open criteria, strConek, adOpenStatic, adLockOptimistic
    Do While Not .EOF
    rtotal = rtotal + CCur(!total)
    txttotal.Text = rtotal
    .MoveNext
    Loop
    .Close
    End With
    End Sub
    Attachment included with the post

    Thanks in Advance
    Attached Images Attached Images  

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6 ListView don't view (Combo Box)

    What do you expect to see?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: VB6 ListView don't view (Combo Box)

    You need to change the view to "Report View" ... given the lack of column headers, I'd say you're in one of the "icon" modes.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB6 ListView don't view (Combo Box)

    Moved From The CodeBank (which is for sharing code rather than posting questions )

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Re: VB6 ListView don't view (Combo Box)

    didn't work !!

    dude i expect to see the reports .. !!! check the code u will get the idea ...

    something is wrong it's not showing nothing ! and not giving an error !!!

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: VB6 ListView don't view (Combo Box)

    I don't see anything in the code that changes the ViewMode to Reports (or Detail, it's been a while)... when it's in icon mode (which it appears to be in), it's not going to show the subitems... it will only show subitems when in Report(Detail) mode.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Re: VB6 ListView don't view (Combo Box)

    Quote Originally Posted by techgnome View Post
    I don't see anything in the code that changes the ViewMode to Reports (or Detail, it's been a while)... when it's in icon mode (which it appears to be in), it's not going to show the subitems... it will only show subitems when in Report(Detail) mode.

    -tg
    Thank you for the fast replay , but can you please give me more info on how to change it to viewmode or a little guide

    Greets

  8. #8
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: VB6 ListView don't view (Combo Box)

    In design... click the list view... then in the properties window, look for the appropriate property, apparently it's called "View"
    http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx

    and set it to the view style you want.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Re: VB6 ListView don't view (Combo Box)

    Quote Originally Posted by techgnome View Post
    In design... click the list view... then in the properties window, look for the appropriate property, apparently it's called "View"
    http://msdn.microsoft.com/en-us/libr...(v=vs.60).aspx

    and set it to the view style you want.

    -tg
    didn't work
    Attached Images Attached Images  

  10. #10
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: VB6 ListView don't view (Combo Box)

    ??? what does it look like when you run it then?

    What you may want to do it put a break point on this line
    Do While Not .EOF

    And then step through the code, make sure you are getting something back in your recordset...


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Re: VB6 ListView don't view (Combo Box)

    i did add a breakpoint ... but nothing happen except when i choose something from the list it does stop the code !! and still nothing appear !!!
    please i just want it to get the list viewed !.
    thanks

  12. #12
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: VB6 ListView don't view (Combo Box)

    Given that you have now changed the View property of the ListView, the fact that you're not getting an 'Invalid Property Value" when you attempt to add the SubItems (because you haven't added any ColumnHeaders) would indicate that the SELECT is not returning any records. That implies that column 'furnizuesi' in Table 'tblFurnizimi' does not contain any values that match (i.e. start with the same characters as) the values of column 'furnizuesi' in Table 'tblFurnizuesit'.

    I suggest you visually check those values in the Tables.

    (Also, add ColumnHeaders to the ListView, perhaps in the Form_Load event - 1 ColumnHeader for each Column in the ListView - , to prevent the error when you do find something to add to the Listview)

    EDIT:I have no idea why this code doesn't fail:
    Code:
    Call dbconek
    ac.Open strConek
    With ar
    criteria = "Select * From tblFurnizimi Where furnizuesi like'" & txtfurnizuesi & "%'"
    .Open criteria, strConek, adOpenStatic, adLockOptimistic
    If strConek is an ADODB Connection object I'd expect the ac.Open to fail; if strConek is not an ADODB Connection Object I'd expect the .Open (for ar) to fail.

    Is the code you posted, in Post#1, the actual code you're executing or just the 'edited highlights', or something completely different that you thought we might be interested in?
    Last edited by Doogle; Aug 1st, 2013 at 02:30 AM.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Re: VB6 ListView don't view (Combo Box)

    Hello Mr.Doogle thank you very much for the respond i am so glad you are here )

    yes the code is the actual code i am executing .. and it returns no error at all.. , but it doesn't show anything in the list .. because it saves nothing in the dbase, but i add some value to the dbase manually and the same it doesn't shows at all...

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Jun 2013
    Posts
    64

    Talking Re: VB6 ListView don't view (Combo Box)

    I fixed the dbase .. Furnizimi , and i add it manual then it appears in the program when i execute..
    But the total not working for some reason
    Anyway i have a new idea ... What if i get the data from another dbase not the furnizimi but the maine dbase and all culomn are exit except the barcode... I will try and return to inform if i get new issue ... Thank u so much for the responses

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