Results 1 to 3 of 3

Thread: ComboBox - Select my value

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11

    Question

    I've got a combobox that I'm populating from the database. That works fine and I am storing an ID in the ItemData for each entry.

    What I'd like to do is to identify one of those items that matches a single value. What's the easiest way to loop through the ITEMDATA of the rows listed in a combobox??

    Thanks....
    TM

  2. #2
    Lively Member
    Join Date
    Apr 2000
    Location
    Rafaela (Argentine)
    Posts
    107
    Try this...

    Code:
    For i = 0 To Combo1.ListCount - 1
        MsgBox Combo1.ItemData(i)
    Next i

  3. #3
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    I am not sure if this is what you mean or not. This just loops through every item in the list and compares the ItemData to ?????

    Code:
    For i = 0 To Combo1.ListCount - 1
      If Combo1.ItemData(i) * "????" Then
        'insert whatever here
      End If
    Next i
    Iain, thats with an i by the way!

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