Hello Friends I am facing a little problem that I want to sort my records according to date I mean to say
I want to show the upcoming records based on dates on the top in ascending order I have a complete working code to fetch from the database but I don’t know that why its not showing up according to my requirements here is my screenshot and database query.
I am using MS Access, VB6 and Listview for displaying all records

If rs.State = 1 Then rs.Close
sql = "SELECT * FROM tblHallBook WHERE book_complete='0' AND book_status='1' ORDER BY book_date ASC"
rs.Open sql, cn
ListView3.ListItems.clear

I don't see a screen print and don't know what you database looks like so maybe some stupid questions but...
1) is book_date a true date field or something else (char or number) with what something that looks like a date?
2) is there a sort defined on the list view that is resequencing the list view after loading?
3) have you debugged to see that you are indeed getting them in the wrong sequence vs something sorting them after the fact?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.