If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Complex Sorting
I have a report of our manufacturing schedule. I have two columns I need to
sort by. There is a [Prod Date] column and a [Ship Date]. I need the schedule to be sorted so that any rows that have a [Ship Date] Now()+21 are sorted by [Ship Date] and any that have a [Ship Date] Now()+21 are then sorted by [Prod Date]. |
#2
|
|||
|
|||
Complex Sorting
hi,
cna48 wrote: I have a report of our manufacturing schedule. I have two columns I need to sort by. There is a [Prod Date] column and a [Ship Date]. I need the schedule to be sorted so that any rows that have a [Ship Date] Now()+21 are sorted by [Ship Date] and any that have a [Ship Date] Now()+21 are then sorted by [Prod Date]. You need a calculated sorting column: SortingColumn: Iif([Ship Date] Now() + 21, [Ship Date], [Prod Date]) And sort by that column. Caveat: Your description has a hole, what do you like do to when [Ship Date] = Now() + 21 ? btw, you should consider using field names without special characters. mfG -- stefan -- |
#3
|
|||
|
|||
Complex Sorting
cna48 wrote:
I have a report of our manufacturing schedule. I have two columns I need to sort by. There is a [Prod Date] column and a [Ship Date]. I need the schedule to be sorted so that any rows that have a [Ship Date] Now()+21 are sorted by [Ship Date] and any that have a [Ship Date] Now()+21 are then sorted by [Prod Date]. Set the report's Sorting and Grouping Field/Expression to an expression like: =IIf([Ship Date] Date()+21, [Ship Date], [Prod Date]) -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|