sort date ascending, if null value sort descending

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

Guest

I need to sort ascending in a report as follows: Group by bank then sort by
date. The crux is if the date is null then place the null date at the end of
the bank group.
 
In the Sorting and Grouping dialog box, replace your date field with

=IIf([YourDateField] Is Null,1,0)

HTH,
Debbie


|I need to sort ascending in a report as follows: Group by bank then sort by
| date. The crux is if the date is null then place the null date at the end of
| the bank group.
 
Swimgirl,

You can use an expression like this to sort on...
IIf(IsNull([YourDateField]),99999,[YourDateField])

This can be done in the query that the report is based on, or in the
Sorting & Grouping dialog of the report design.
 

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