combo box sort in my specified order

P

PURVIANCE

I have a combo box with several choices. I don't want it alphabetized. I want
it sorted exactly how I have typed it in. The system keeps defaulting to
alphabetized. I have not selected a sort order. How do I fix this?
 
J

Jeff Boyce

Comboboxes are based on underlying recordsets, typically either a named
query or a SELECT statement. If that underlying query/SELECT doesn't
contain any sorting order, neither will the combobox.

NOTE: Access stores records in tables in a mysterious, arcane,
unavailable-for-human-inspection manner. This is NO readily apparent
"order" to the records. The only order is the order you impose. If your
table doesn't have a "Sort by me" column, Access gets to chose the order...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Dale Fye

The method I usually use is to add a [Sort_Order] field to the table that is
the RowSource for the combo box. Then change the RowSource to something like:

Select yourField
FROM youTable
ORDER by [Sort_Order]

Then save this query (it will be a fraction quicker if it is compiled and
saved). I usually give my control rowsource query names that look like:

qry_frm_FormName_cbo_ControlName

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

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