Sorting Combo Boxes in a Form

J

Jessica

I have a few combo boxes that pull information from tables. The tables has
been sorted, but if i add new information to the table and sorted again. It
will not make the changes to the combo box. How can i have the combo box
automatically sort.
 
D

Dirk Goldgar

Jessica said:
I have a few combo boxes that pull information from tables. The tables has
been sorted, but if i add new information to the table and sorted again.
It
will not make the changes to the combo box. How can i have the combo box
automatically sort.


The combo box's rowsource should be set to a query that explicitly sorts the
table. For example,

SELECT ID, Description FROM MyTable ORDER BY Description;
 
R

RonaldoOneNil

Tables do not need to be sorted, they shoul only be used for storing data.
Use queries, forms and reports to sort the data how you want.
Either create a query from your table and sort accordingly and then base
your combo boxes on queries instead of tables or modify the Row Source
property of your combo boxes and add an ORDER BY [Field Name 1],[Field Name
2];
 

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

Top