Position one value at the top in a combo box

Hello Experts
Wondered if there is an (easy) way to do this.

I have a combo box listing the records in a table.  I would like the listing to be sorted alphabetically EXCEPT for one particular entry to appear at the top.  I don't really want to call it AAAentry.

This is not vital, but I would like to do it if possible.

Is this possible?

Regards

Richard
rltomalinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun KlineLead Software EngineerCommented:
If you have the ability to change the table design, an easy way would be to add a number field that "groups" the entries, giving the value that you want at the top a lower number, and then modify the query that loads the combo box to sort by grouping and then by name.

If you do not want to do this by changing the table design, a similar option can be done using the IIF statement in the sort order.
0
Dale FyeCommented:
I generally use a union query, something like:

SELECT myCombo.Field1
FROM (
SELECT [Field1], [Field1] as SortOnThis FROM your Table
UNION
SELECT "Put this one first", "" FROM tblNumbers
WHERE lngNumber = 0
) as myCombo
ORDER BY myCombo.SortOnThis

I have a table in all of my databases "tblNumbers", which contains a single field (lngNumber) and 10 values (the numbers 0-9) for use in cases like this.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rltomalinAuthor Commented:
Thanks for the prompt feedback.  Not sure which solution I will use yet.

Best regards

Richard
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.