Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

Drop down list

Hi All

I’m using MS Access 2007.

I have a drop down list.
Code  |  Description
    1    |     yes
    2    |     No
    3    |     Unknown

In one of my forms I need the code to reflect.  This is not a problem.  In my other form I need the Description to reflect.  How do I get the second column (Description) to reflect as the value?

Thanks in advance
0
Reyesrj
Asked:
Reyesrj
  • 6
  • 3
1 Solution
 
IrogSintaCommented:
If you change the BoundColumn property to 2, the values uh the second column will be returned.
0
 
ReyesrjAuthor Commented:
went back to the form and removed the field and put it back.  When I went into form view the second column was reflecting.  Then I tested it and changed the selection and it went back to reflect column 1.
0
 
ReyesrjAuthor Commented:
Sorry,

I tried that already.  The bound column is showing 2.  I also set the bound column to 2 in the table.  I went back to the form and removed the field and put it back.  When I went into form view the second column was reflecting.  Then I tested it and changed the selection and it went back to reflect column 1.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
IrogSintaCommented:
I'm a bit confused by what you mean by reflecting.  If you mean the column that is returned when you refer to the combo box via code or in a query, then that would be the bound column.  Or perhaps you are just showing a single column and want the combo box to show either column 1 or column 2; if that is the case, you would set the ColumnCount property to 2 and the ColumnWidths property to 0";1"
0
 
ReyesrjAuthor Commented:
Sorry,
When I’m in from view I click on the drop down arrow.  The code and description is displayed.  If I choose “1  |  yes” the list goes away and “1” will reflect in the field box, the bound column 1.  How do I get “Yes” to reflect in the field box, bound column 2?
0
 
Rey Obrero (Capricorn1)Commented:
.
0
 
ReyesrjAuthor Commented:
0
 
ReyesrjAuthor Commented:
Please see my attachment.
Thanks
0
 
IrogSintaCommented:
I'm unable to open your attachment right now. But you would just use the column property like so:
Me.NameOTextBox = Me.NameOfComboBox.Column(1)

See this link http://msdn.microsoft.com/en-us/library/office/ff834793.aspx
0
 
ReyesrjAuthor Commented:
I'm new to Access but I was able to figure out that the code goes into the code builder in after update under the Event tab.  Anyhow, this was the solution I was looking for.

Thanks.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now