Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box - Input

Status
Not open for further replies.

RonCT

Technical User
Dec 11, 2003
37
0
0
US
I have a combo box on a form that is made up from a table. When a user is in the form they can click the combo box and see a list of people. The combo box on the form will accept a new entry but when I look at the table, the new name isn't included. Can someone tell me the correct setting to have new entries be accepted by the combo box/table? Also, how do I have the combo box on the form show the names in alphabetical order? I tried doing it within the table but it didn't work. Thanks!
 
Hi Ron.
a) The ComboBox is unbound, i.e. you have set the row source, so you have values to choose from, but you haven't told Access where to store the values. Set this in the Control Source property of the combo.

b) In order to sort the entries, click on the query builder in the row source (the three dots to the right).
choose your table and the name field and choose sort order ascending. Then close and click YES on the prompt.

Cheers,
Andy

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
How are ya RonCT . . . . . .

Look to the NotInList event to circumvent adding new data to the table.

For sorting, base the RowSource on a query which is based on the table. Do your sorting in the query.

TheAceMan [wiggle]

 
Thanks guys! Andy - b) works great. But with a) when I tried to change the Control Source I received an error message on the form %Name. Currently in the Control Source property I have the name of the field which is Project Sponsor. The name of the table is Project_Sponsor. Any way to fix this without messing the database up?
 
Is the form itself bound to any table/query?
Have you put the control name in there manually?

If all data binding is correct, then you should be able to choose the control name from the drop down selection in the combo properties.

If not: Click outside the form to get the form properties. Take a look into the data tab and verify the data source. If it is a query, check if Project_Sponsor is included in the query's fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top