combo box sorting

A

artemis1027

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?
 
M

Mauricio Silva

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
 
A

artemis1027

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

The fields are ConsumerALastName and ConsumerAFirstName and it automatically
adds ConsumerAID.
 
D

Douglas J Steele

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)
 
Top