Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drop down list

Posted on 2013-06-16
10
Medium Priority
?
403 Views
Last Modified: 2013-06-17
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
Comment
Question by:Reyesrj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
10 Comments
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39251958
If you change the BoundColumn property to 2, the values uh the second column will be returned.
0
 

Author Comment

by:Reyesrj
ID: 39251983
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
 

Author Comment

by:Reyesrj
ID: 39251985
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 29

Expert Comment

by:IrogSinta
ID: 39251998
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
 

Author Comment

by:Reyesrj
ID: 39252042
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39252052
.
0
 

Author Comment

by:Reyesrj
ID: 39252064
0
 

Author Comment

by:Reyesrj
ID: 39252067
Please see my attachment.
Thanks
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 1500 total points
ID: 39252107
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
 

Author Closing Comment

by:Reyesrj
ID: 39255258
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question