combo box sorting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have read the other questions about this topic, but have not come across
the answer to my question.

I have a combo box at the top of my form that looks up Consumer records when
the name is chosen. I would like this combo box to list them alphabetically,
but for some reason, every time I enter a new record, it is not listed
alphabetically. The first half of the list is fine, then about half way
down, but then it starts listing the new entries in alphabetical order below
the first list. I have tried closing out and restarting and it has not
worked.

Any suggestions?
 
Could you send the RowSource of your ComboBox?
If it is a table, could you send a lsit of the fields as well?

Mauricio Silva
 
The row source is: SELECT tblConsumer.ConsumerAID,
tblConsumer.ConsumerALastName, tblConsumer.ConsumerAFirstName FROM
tblConsumer;

The fields are ConsumerALastName and ConsumerAFirstName and it automatically
adds ConsumerAID.
 
Change that to

SELECT tblConsumer.ConsumerAID, tblConsumer.ConsumerALastName,
tblConsumer.ConsumerAFirstName FROM tblConsumer ORDER BY
tblConsumer.ConsumerALastName, tblConsumer.ConsumerAFirstName

or even shorter

SELECT ConsumerAID, ConsumerALastName, ConsumerAFirstName FROM tblConsumer
ORDER BY ConsumerALastName, ConsumerAFirstName

(there's really no need to include the table name in the query if there's
only one table)
 

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

Similar Threads

Combo Box, list order 3
Update combo box 2
A-Z Sorting Combo 2
Sort with Combo box 2
Combo Box 1
Sorting without articles 3
Combo Box 3
combo boxes 7

Back
Top