Hi all
I have an Access database Table and one of the columns has a date value the column name is closing.
I would like to do an order by closing asc the null values are allways on top and I would like it to be at the bottom.
I have googled for a solution and I came up with this

Dim SelectQueryString As String = "SELECT * FROM " & Filter & " order by case when Closing is null then 1 else 0 end, Closing"

When executing this query I get Unrecognized keyword WHEN error.
thanks in advance

Case won't work in Access.
Try a statement like
select * from table order by closing Is Not Null, Closing

thanks Adam for your reply.
I have tried and it works.

Be a part of the DaniWeb community

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