Solved

How to change field in forms to drop down lists

Posted on 2014-07-24
3
155 Views
Last Modified: 2015-02-25
I am new to Access 2013- I am using a template called Contacts which had tables, forms reports already created, I just had to import that data from my Excel spreadsheet.  I added this field and formatted it as drop down and entered the choices for it in the table.  But the problem is when I try to get this information to show in the existing forms it will not.  It shows the field I added to the table but it is not showing the drop down options.  I have tried to figure out how to get this to work and so far have not been able to.  Can someone tell me how I can change/format the 2 existing forms so that this field will show the drop down selections that are setup for this field in the table?
0
Comment
Question by:jajen
3 Comments
 
LVL 31

Expert Comment

by:Helen_Feddema
Comment Utility
Generally, this is done by placing a combo box on the form, bound to the field, with a row source of the table containing the items for the drop-down list.  The field may be a text field, holding selections from the list, or (more usually) it would be a numeric field, holding an ID value.  In that case, the lookup table would have a numeric ID field and another field to display in the drop-down list, with the first column width set to 0 so it won't display in the list.
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
If you open the form in design view and right-click on the textbox, you will see an option to change it to a combo.  Once it is changed to a combo, you need to set several properties to get it to work correctly.

Data Tab
1. Control Source - if you used the method I suggested, the control should still be bound to the correct column.  The Control Source defines what column in the Forms RecordSource will hold the selected value
2. Row Source - this is a table/query that contains the "list" of items that will appear in the dropdown.  Make sure it is sorted and conventionally, the "key" column is the first column and the "display" column is the second column.
3.  Bound Column - usually 1 but could be different if the "key" column is not the first column.
4. Limit To List - I set mine to Yes because I don't generally allow people to add to the list on the fly.
Format Tab
5. Column Count - total number of columns selected in item #2.  If you bind the RowSource directly to a table (not recommended), this is the number of columns in the table.
6. Column Widths - specifies the width of each column in item #5.  0 means hide the field.  Anything else will display it.  Typically we hide the "key" column if it is an autonumber ID and display the "display" column(s).
7. Column Heads - I set this to Yes if I am displaying more than one column in item #5 so the user knows what he is looking at.
8. List Width - make this wide enough to be at least the sum of all values in item #6.

There are lots of other properties but these 8 are the ones you will set to make the combo "work".
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
I added this field and formatted it as drop down and entered the choices for it in the table.  But the problem is when I try to get this information to show in the existing forms it will not.  It shows the field I added to the table but it is not showing the drop down options.

Make sure the RowSourceType Property of the combobox is set to: Value List
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now