jrthor2
01-10-2003, 10:04 AM
I have an Access 200 database of new members for our church. When you put in a new member, you put in the dates as xx/xx/xxxx, all one field. What I need to do is be able to sort by the year part of the date, so it lists the most recent members first. I have the code in there now, but it is not sorting by the year, I think is is sorting by the month, and then the day and then the year. Here is what my code is so far:
If order="MembershipDate" or order2="MembershipDate" Then
strOrderBy = "MembershipDate"
SQLstmt = "SELECT * from New_Members order by MembershipDate Desc"
If order="MembershipDate" or order2="MembershipDate" Then
strOrderBy = "MembershipDate"
SQLstmt = "SELECT * from New_Members order by MembershipDate Desc"