Date Order in a Form

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

Guest

How can I get my dates in a list box on my form to display in date order and
not number order? My dates are in a separate table call "Dates" with two
columns; First column is "Dates ID" which is an auto-number field and the
second is "Dates".

Property on the form for the field (HRAP Date) is:
Row Source: SELECT Dates.Dates FROM Dates;

Thanks for your help

--
 
Use an OrderBy clause in your RowSource.
How can I get my dates in a list box on my form to display in date order and
not number order? My dates are in a separate table call "Dates" with two
columns; First column is "Dates ID" which is an auto-number field and the
second is "Dates".

Property on the form for the field (HRAP Date) is:
Row Source: SELECT Dates.Dates FROM Dates;

Thanks for your help

--
 
I would suggest you go to the query builder and play a bit. Once you get
what you want returning then switch to SQL View and see what the SQL looks
like.
I'm pretty new at this......what would I need to type in this area?
Use an OrderBy clause in your RowSource.
[quoted text clipped - 9 lines]
 
I'm pretty new at this......what would I need to type in this area?

Well, the first thing you need to do is use some sort of naming
convention to differentiate between a table named "Dates" and a field
named "Dates".
It may all be clear to you today, but in 6 months it's going to be
confusing. Think of the confusion in your household if every person's
first name was "John" and the family last name was "John".

Change the Field Name to something like "dteDates"
Change the Table name to something like "tblDates".

Then, as row source for the list box, write:
SELECT tblDates.dteDates FROM tblDates Order by dteDates;
 
Back
Top