1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Creating an invisible column in a combobox in eVB

Discussion in 'Software Development' started by irosen516, Feb 3, 2003.

Thread Status:
Not open for further replies.
  1. irosen516

    irosen516 Thread Starter

    Dec 9, 2002
    Hi there. I'm remembering back to my days working with Access and remember being able to create a combobox with two columns where I could have one column be invisible and then stored that value in a database, etc. I would like to do the same thing in eVB. Does anyone know if there is a way to do that? I found something about CBS_EX_CONSTSTRINGDATA, but can't find too much information about it or how to use it. Thanks.
  2. TimCottee


    Oct 10, 2001
    The eVB combo box like the VB combo box doesn't allow multiple columns like the MS Forms combo box in Access. It does have an ItemData property for each item:
    Private Sub Combo1_Click()
        MSgbox Combo1.ItemData(Combo1.ListIndex)
    End Sub
    Private Sub Form_Load()
        For i = 1 To 10
            Combo1.AddItem "Item " & CStr(i)
            Combo1.ItemData(Combo1.NewIndex) = 100 * i
    End Sub
    Unfortunately you can only use it to store values of the Long datatype and not strings but this could be used as a pointer to an associated array of other elements.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/116811

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice