A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Complex Sorting



 
 
Thread Tools Display Modes
  #1  
Old January 16th, 2009, 01:30 PM posted to microsoft.public.access.reports
cna48
external usenet poster
 
Posts: 16
Default 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  
Old January 16th, 2009, 02:02 PM posted to microsoft.public.access.reports
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default 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  
Old January 16th, 2009, 02:53 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.