Drop Down Menu Sorting

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

Guest

How do I sort a drop down menu for selection from a database? Example... I
want the user to choose a day of the week from my access database and display
the results. Right now it's displayed in alphabetical order like this...

Fridays
Mondays
Saturdays
Sundays
Thursdays
Tuesdays
Wednesdays

Obviously I'd like to sort it by Monday to Sunday... How do I do this please?
 
You can add a column in your database with numbers for the days say
Monday | 1
Tuesday | 2
and so on.
That way you can order by the numbers even though you only get the
actual name of the day.
Something like this:
SELECT yourtable.weekdays FROM yourtable ORDER BY yourtable.daynumbers

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
Ok great, thanks.

Jens Peter Karlsen said:
You can add a column in your database with numbers for the days say
Monday | 1
Tuesday | 2
and so on.
That way you can order by the numbers even though you only get the
actual name of the day.
Something like this:
SELECT yourtable.weekdays FROM yourtable ORDER BY yourtable.daynumbers

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
Back
Top