Combobox not in same order as table

S

smilee8_28

I have a combobox in a form with a simple one column list table for the
source. I sort the table alphabetically but it does not appear that way in
the combobox. As I add records in the table I re-sort it each time but the
new records still appear wrong in the combobox. The new records are show
either at the beginning or end of the list.

How do I get the combobox to display the records in the same order as they
are in the table?
 
J

Jeff Boyce

How do you "sort the table alphabetically"?

If you are basing your combobox directly on the table, I can imagine this
happening.

If you create a query against the table and include a sort (ORDER BY)
condition in the query, then you can use that query as the source for your
combobox.

NOTE: your table does NOT keep a sorted set of data. Access tables are
"buckets o' data", with no readily perceptible order. Only YOU can impose
order.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

Maurice

Tables are not the place where you should look at data. Tables are just the
place to store the data. When removing and adding data the sorting is
irrelevant in the table. If you want to sort the combobox you should set the
source to a query and set the sorting option in the query. Once set it will
always work no matter how many rows are added or removed.
 

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