Combo Box Alphabetical Order

  • Thread starter Thread starter Bobbie
  • Start date Start date
B

Bobbie

Is there a way on my forms that I could
1. Have the entries appear in alphabetical order?
2. The combo box populate anytime I type in an entry that doesn't
appear in the combo box as an option.

I would like to thank you all in advance for any suggestions.

Bobbie
 
Bobbie,

Add an ORDER BY clause to the combo box' RowSource SQL statement, e.g.,
change:

SELECT Customer.ID, Customer.Name FROM Customers

to

SELECT Customer.ID, Customer.Name FROM Customers ORDER BY Customers.Name

I'm not sure what you mean by question #2. If you wish to permit user entry
of items not in the RowSource, but not save them to a table such that they
subsequently appear in the drop-down list, set the LimitToList property to
No, otherwise, set it to Yes, and use a custom LimitToList event procedure to
add the item. A search of the forum or Google will show you how to do this.

Hope that helps.
Sprinks
 
Bobbie,
1. How your records sort on your form is determined by the
sort order you designate inthe query behind the form.
If you designated a table as the RecordSource, your records will
probably sort by the "indexed" or key field in your table, and you
won't have any control over that.
If you use a query as the RecordSource, you can control how
the records sort/display.

2. I think you mean... "how to add a new choice to your
combo box." Try...
http://home.comcast.net/~cccsolutions/accesstips.html
under NotInListCombobox. This demonstrates how to use the
Not In List event too Add a New Selection to a Combobox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top