Results 1 to 11 of 11

Thread: List problem

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    76

    List problem

    here i've got a problem i was just trying with my assesment so...
    here i was doing my problem using listview but actually i didn't get mush knowledge bout listview till then i wanna just get u alls help...i've got to option button using control array so i was to display when i click on option buttons so here is my code with error ya so just plezz help me ya...
    again when i compile the program error comes like this ...Operation is not allowed when the object is open c this also plezzz...

    VB Code:
    1. Private Sub optSelect_Click(Index As Integer)
    2.     Dim TItem As ListItem
    3.    
    4.     Call data_connection
    5.    
    6.     strSQL = ""
    7.     strSQL = "SELECT * FROM tblCustomer"
    8.    
    9.     Set rsLv = gconn.Execute(strSQL)
    10.    
    11.     'rsLv.Open strSQL, gconn, adOpenKeyset, adLockOptimistic, adCmdText
    12.    
    13.     Select Case Index
    14.  
    15.         Case 0
    16.             MsgBox rsLv("fldFirstName")
    17.             While Not rsLv.EOF
    18.                 Set TItem = lvwCust.ListItems.Add(, , rsLv("fldFirstName") & " " & _
    19.                     rsLv("fldFamilyName"))
    20.                     rsLv.MoveNext
    21.  
    22.              Wend
    23.  
    24.         Case 1
    25.             MsgBox rsLv("fldSuburb")
    26.             Do Until rsLv.EOF
    27.                 'Set TItem = lvwCust.ListItems.Add(, , rsLv("fldSuburb"))
    28.                             Set TItem = lvwCust.ListItems.Add(, , rsLv("fldFirstName") & " " & _
    29.                 rsLv("fldFamilyName") & " ( " & rsLv("fldSuburb") & ")")
    30.                 rsLv.MoveNext
    31.  
    32.             Loop
    33.  
    34.     End Select
    35.    
    36.        
    37.            
    38. End Sub
    Last edited by Hack; Dec 20th, 2005 at 06:43 AM.

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