Sorting and Grouping

B

bw

I have the following in the Sorting and Grouping Box (I hope this formats
okay):

Field Sorting Group Header Group Footer Group
On
Billed Ascending No No
Each Value
BillDate Descending Yes Yes
Year
BillDate Ascending No No
Each Value

Billed is a Yes/No Field
BillDate is a Date Field

When Billed is "Yes", I want to use the above Sorting and Grouping.
When Billed is "No", I want the first BillDate above to Sort Ascending.

Does anyone have a suggestion as to how to do this?

Thanks,
Bernie
 
M

Marshall Barton

bw said:
I have the following in the Sorting and Grouping Box (I hope this formats
okay):

Field Sorting Group Header Group Footer Group
On
Billed Ascending No No
Each Value
BillDate Descending Yes Yes
Year
BillDate Ascending No No
Each Value

Billed is a Yes/No Field
BillDate is a Date Field

When Billed is "Yes", I want to use the above Sorting and Grouping.
When Billed is "No", I want the first BillDate above to Sort Ascending.

Change the first BillDate entry to something like:
BillDate Ascending Yes Yes Each Value
=Year(BillDate) * IIf(Billed, 1, -1)
 
B

bw

Marshall Barton said:
Change the first BillDate entry to something like:
BillDate Ascending Yes Yes Each Value
=Year(BillDate) * IIf(Billed, 1, -1)

The actual code that worked was: =[BillDate]*IIf([Billed],-1,1)
It's just amazing what we learn here. It's just amazing what you guys
know.

It never occurred to me to use a formula in the Sorting and Grouping
box.
Thanks for your help again, Marshall.
Bernie
 

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

Top