Report text box

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

Guest

Hello.. I have a report which lists (in the detail section) an order date,
due date, and send date for job orders. I would like to add an additional
text field to the report which would indicate (in text) the following:

1. When the "due date" was omitted (new text field would print "omitted")
2. When the "send date" is null, but Now() is less than the "due date" (new
text field would print "pending")
3. When the "send date" is later than the "due date" (new text field would
print "late")

I wanted to use the "IIf statement", however, it seems that will only
evaluate two conditions, and I need three. Any ideas how I might accomplish
this?
 
EdS said:
Hello.. I have a report which lists (in the detail section) an order date,
due date, and send date for job orders. I would like to add an additional
text field to the report which would indicate (in text) the following:

1. When the "due date" was omitted (new text field would print "omitted")
2. When the "send date" is null, but Now() is less than the "due date" (new
text field would print "pending")
3. When the "send date" is later than the "due date" (new text field would
print "late")

I wanted to use the "IIf statement", however, it seems that will only
evaluate two conditions, and I need three. Any ideas how I might accomplish
this?

Set the text box expressions to:

=IIf([Due Date] Is Null, "Omitted", IIf([Send Date] Is Null,
IIf(Date() < [Due Date], "Pending", "???"), IIf([Send Date]
[Due Date], "Late", "???")))

I used ??? in the places where the various conditions are
not satisfied, but you didn't specify what the result should
be.
 
Thanks Marsh! That is a great solution!

Marshall Barton said:
EdS said:
Hello.. I have a report which lists (in the detail section) an order date,
due date, and send date for job orders. I would like to add an additional
text field to the report which would indicate (in text) the following:

1. When the "due date" was omitted (new text field would print "omitted")
2. When the "send date" is null, but Now() is less than the "due date" (new
text field would print "pending")
3. When the "send date" is later than the "due date" (new text field would
print "late")

I wanted to use the "IIf statement", however, it seems that will only
evaluate two conditions, and I need three. Any ideas how I might accomplish
this?

Set the text box expressions to:

=IIf([Due Date] Is Null, "Omitted", IIf([Send Date] Is Null,
IIf(Date() < [Due Date], "Pending", "???"), IIf([Send Date]
[Due Date], "Late", "???")))

I used ??? in the places where the various conditions are
not satisfied, but you didn't specify what the result should
be.
 
Back
Top