Sorting two different fields

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

Guest

I have a database that has fields ED1 and ED2. My report shows the result of
either ED1 or ED2, depending if ED2 is null or not. My problem is that
everything is fine if all are ED1 but once there is also an ED2 entry it
shows sorting as just ED1.

Example:

2/28/2005
2/28/2005
2/28/2008 - ED2 ( ED1 was 2/28/2005)
2/28/2005
It seems it still sorts on the ED1

I've tried all sorts of things but I'm lost. Any help??
 
Unless I'm not understanding correctly ...

Within the Query that underlies this report, create a calculated field and
use this as the field for your report.

For example, in the Query, in a blank column, enter the following

EDResult: IIf(Isnull(ED2),ED1,ED2)

The above creates a field (in the query, so it's accessible to the report)
called EDResult. If ED2 is null, it'll contain the value from ED1 ---
otherwise it'll contain the value from ED2.

Now change your report to refer to the field EDResult and see what happens..

Bob.
 
Thanks Bob
It works, the only yhing is when I open the report it asks for a parameter
value(ED). I just click on the blank and the report comes up just right. Is
there something I should have done or not done.
 
Back
Top