Forum Home
Press F1
 
Thread ID: 42836 2004-02-24 04:35:00 date sorting in access rev2000 (3021) Press F1
Post ID Timestamp Content User
217798 2004-02-24 04:35:00 I have a database that has among other things birthdates sorted as dd,mm,yyyy
I want to be able to create a report that lists these birthdays in calendar order .

I have created a query to pull out the birtdates but I am not able to figure out how to sort the dates into order in this query or in the subsquent report .

Can someone help me please .

I am using access 2002

Thankyou
rev2000 (3021)
217799 2004-02-24 07:25:00 In the query there is a sort option. Simply click in that row and select Ascending or Descending. What data type is the date field - as a date or text? parry (27)
217800 2004-02-24 11:44:00 Based on the presumption the date field is in dd/mm/yyyy format (ie you used date/time as the data type in the table)



Create a new report .

Base a query on the table

Use the day, month, year functions on the date field
In this example insert three fields containing the date field .
Use the above functions as:
day: Day([date]) where day is the field name to be used in the report and date is the field name used in the table,
month: Month([date]) where month is the field name to be used in the report and date is the field name used in the table,
year: Year([date]) where year is the field name to be used in the report and date is the field name used in the table


In the report use the sorting and grouping
Group by field, sort ascending/descending, use headers and footers as required .




Ask not what you can do for your country, ask what's for lunch
- Orson Welles on reaching 300 pounds
Merlin (503)
1