Sorting combo drop-down list?

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

Guest

Hi - thanks in anticipation!

I have a database being populated via a form - let's say an employee name
plus a bunch of other stuff
I also have a startup screen which provides the user with a search button
connected to a drop down combo that shows all the names of all the employees
in the database so far..it's linked to the name column in the database.
All is working perfectly.

Since the emp. name in the database is being generated one name at a time,
it's not alphabetized, it's just in the record # order. So the combo box on
the startup screen also shows non-alphabetized list.

Is there anyway to have the combo box show the names in ascending order?

Thanks.
 
Hi - thanks in anticipation!

I have a database being populated via a form - let's say an employee name
plus a bunch of other stuff
I also have a startup screen which provides the user with a search button
connected to a drop down combo that shows all the names of all the employees
in the database so far..it's linked to the name column in the database.
All is working perfectly.

Since the emp. name in the database is being generated one name at a time,
it's not alphabetized, it's just in the record # order. So the combo box on
the startup screen also shows non-alphabetized list.

Is there anyway to have the combo box show the names in ascending order?

Thanks.

Create a query, using that table as it's recordsource:

Select YourTable.EmployeeID, [LastName] & ", " & [FirstName] as
FullName, [OtherField] Order By [LastName] & ", " & [FirstName];

Make that query the RowSource of the combo box.
The names will be in LastName, FirstName order, with the employee ID
field as the first row. Hide that first row by setting the Column
Widths property to:
0";1";1"

Set the Bound Column to 1.
Set the Column Count to 3.

The EmployeeID field will be the bound field and the value searched
for. Make sure you search the correct field.
 
FOUND IT! No need for a reply - THANK YOU anyway.

That's great.
However, had you cross-posted instead of multi- posted, other's would
not have wasted their time replying in the other newsgroup.

Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), cross-post by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.

See Netiquette at http://www.mvps.org/access

It's a great site to visit anyway.
 
Back
Top