If, then statement on report textbox

F

franklinbukoski

I would like to add a field on a report that determines the amount of time it
takes to process an action.
If processed same day received I'd like the field to show Same Day.
If received but not processed, I'd like the field to show how many days it
has been since received from todays date.
If received and processed, but not the same day, I would like the field to
show how long it took to process. Something like the below string?
=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))
 
T

tina

assuming that [a] = received date and = processed date, AND assuming
that those two fields in the underlying table are Date/Time data type, AND
assuming that only the date is recorded, not a specific time, then try

=IIf([a] = , "Same Day", IIf( Is Null, DateDiff("d", [a], Date()),
DateDiff("d", [a], )))

hth
 
F

franklinbukoski

PERFECT! Thank you,

tina said:
assuming that [a] = received date and = processed date, AND assuming
that those two fields in the underlying table are Date/Time data type, AND
assuming that only the date is recorded, not a specific time, then try

=IIf([a] = , "Same Day", IIf( Is Null, DateDiff("d", [a], Date()),
DateDiff("d", [a], )))

hth


franklinbukoski said:
I would like to add a field on a report that determines the amount of time it
takes to process an action.
If processed same day received I'd like the field to show Same Day.
If received but not processed, I'd like the field to show how many days it
has been since received from todays date.
If received and processed, but not the same day, I would like the field to
show how long it took to process. Something like the below string?
=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))

 
T

tina

you're welcome :)


franklinbukoski said:
PERFECT! Thank you,

tina said:
assuming that [a] = received date and = processed date, AND assuming
that those two fields in the underlying table are Date/Time data type, AND
assuming that only the date is recorded, not a specific time, then try

=IIf([a] = , "Same Day", IIf( Is Null, DateDiff("d", [a], Date()),
DateDiff("d", [a], )))

hth


franklinbukoski said:
I would like to add a field on a report that determines the amount of
time
it
takes to process an action.
If processed same day received I'd like the field to show Same Day.
If received but not processed, I'd like the field to show how many days it
has been since received from todays date.
If received and processed, but not the same day, I would like the field to
show how long it took to process. Something like the below string?
=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))=IIf([a]=,"Same Day"),(isnull, (Date())-[a]),
(NotNull[a],-[a]))

 

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