+ Reply to Thread
Results 1 to 4 of 4

Combo Box Display Property

  1. #1
    Registered User
    Join Date
    09-09-2008
    Location
    AZ
    Posts
    13

    Combo Box Display Property

    I have a combo box (control toolbox) that references a range. I have the properties set to only show 2 of the 4 columns and the bound property set to the data I need to pull. When I use the drop down I see the data I want, but when I select an employee only thier emp id remains displayed. What property do I need to change to retain the data displayed in the list.

    Attached is a sample version with same set properties
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day,

    This is the way I would do it.

    On Sheet2 I would use col A has a helper col and insert this formula

    Please Login or Register  to view this content.
    Then change your properties setting in the combo box that reference the range of col A.

    Anywho......I feel like your double up on information here. Have you considered a data validation. Another form of a drop down box and using the information in Col A direct to the cell at Sheet 1 B5

    Data Validation basic info

    HTH
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Registered User
    Join Date
    09-09-2008
    Location
    AZ
    Posts
    13
    I'm using a combo box because I'm activating a macro once the employee is selected. I also need to keep the employee id separate so I can use it as a unique identifier for other vlookup formulas in the full report. I have the whole thing set up perfectly except for the way the selection is displayed, driving me a little crazy

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Melli602,

    This should help you understand what is going on.

    From the VBA Help Files
    You can display one set of data to users but store different, associated values for the object by using the BoundColumn and the TextColumn properties. TextColumn identifies the column of data displayed in text box portion of a ComboBox and the value stored in the Text property; BoundColumn identifies the column of associated data values stored for the control. For example, you could set up a multicolumn ListBox that contains the names of holidays in one column and dates for the holidays in a second column. To present the holiday names to users, specify the first column as the TextColumn. To store the dates of the holidays, specify the second column as the BoundColumn. To hide the dates of the holidays, set the ColumnWidths property of the second column to zero.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1