How can I sort access records by day then month then year ?

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

Guest

I want to create a birthday list Form from a database table, it will sort by
month and year but not by day. Any help ?
 
Not clear from the subject vs content, but I think you want a list of the
birthdays as they will happen during the year (i.e. Jan 1 first, regardless
of the year of birth).

If so:

1. Create a query into this table.

2. Type this into a fresh column in the Field row:
WotMonth: Month([BirthDate])
Substitute your field name for BirthDate.
In the Sorting row, choose: Ascending

3. Type this into another column of the Field row:
WotDay: Day([BirthDate])
Substitute your field name for BirthDate.
In the Sorting row, choose: Ascending

If that is not what you wanted, there is also a Year() function, so you can
sort by that as desired.
 
Create a query with birth month and birth year:
BDay: Month([BirthDate])
BYear: Year([BirthDate])

Then just sort on these fields as appropriate


Allen Browne said:
Not clear from the subject vs content, but I think you want a list of the
birthdays as they will happen during the year (i.e. Jan 1 first, regardless
of the year of birth).

If so:

1. Create a query into this table.

2. Type this into a fresh column in the Field row:
WotMonth: Month([BirthDate])
Substitute your field name for BirthDate.
In the Sorting row, choose: Ascending

3. Type this into another column of the Field row:
WotDay: Day([BirthDate])
Substitute your field name for BirthDate.
In the Sorting row, choose: Ascending

If that is not what you wanted, there is also a Year() function, so you can
sort by that as desired.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ibrox said:
I want to create a birthday list Form from a database table, it will sort
by
month and year but not by day. Any help ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top