Results 1 to 5 of 5
  1. #1
    mcomp72 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    92

    Combo Box only showing data from Column 1 once selected

    Hi everyone. I'm relatively new to Access, and have hit a problem I just can't figure out. I have created a combo box on one of my forms. It worked just fine yesterday, but today I made a slight change to my table, and now it doesn't work quite right.



    First, a quick explanation of how I made the combo box:

    I set it up to have two columns: Column 1 was a number (1, 2, 3, 4), and Column 2 was a description. The value of Column 1 would be placed in a field in my table, once the user made their selection. I initially set up that field to be of data type Short Text.

    The combo box was working fine yesterday. Then, this morning, I decided to change the data type of the field to Number (Integer). Now once someone makes a selection in that combo box, only the number continues to appear in the combo box after the selection is made. I change the data type back to Short Text, but this problem still occurs. I even tried deleting the combo box and recreating it, but the problem is still there.

    You can see a screenshot here.

    Click image for larger version. 

Name:	FormScreenshot.png 
Views:	15 
Size:	25.6 KB 
ID:	30525

    I have looked all over the Properties of the combo box to see if I can figure out how to get it to continue to show both columns once a selection is made, but I cannot figure it out. Any help would be appreciated.

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Is the row source from another table or from a value list?

    I'm thinking set it up so the first column is the numeric value like you have done, but have the second column be a concatenation of the Numeric value and the description. Then under properties -> format -> col widths something like 0";3" to hide the first numeric column (which should be the bound column) but leave the description for UI that you're looking for.

    For example if it's a value list, the row source might look like this: 1;"1 - A citizen of the United States";2;"2 - A noncitizen national of the United States"

  3. #3
    Join Date
    Apr 2017
    Posts
    1,679
    The combo box shows 1st visible column (the 1st column with width > 0)

    Set ColumnWidths property to "0;2.5" (The with of 2nd column can be any value > 0 -it doesn't really affect anything except visibility).

  4. #4
    mcomp72 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    92
    Thanks to the both of you. I didn't realize that the combo box would only show the value of the 1st visible column. Thought it was showing both yesterday, but perhaps I was confusing that with a list box.

    I took your suggestion about changing col width of Col 1 to 0 and that added the number to the beginning of Col 2 text. Worked perfectly!

  5. #5
    Join Date
    Apr 2017
    Posts
    1,679
    Probably you did see both columns in query wizard when you designed combo.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 05-10-2016, 10:45 AM
  2. Replies: 3
    Last Post: 01-29-2016, 08:52 PM
  3. Replies: 15
    Last Post: 04-16-2014, 01:15 PM
  4. Replies: 3
    Last Post: 10-17-2012, 03:16 PM
  5. Replies: 1
    Last Post: 12-09-2011, 05:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums