| re: Testing for time elapsed
On Thu, 30 Jun 2005 20:05:27 -0400, Barbara Warszycki wrote:
[color=blue]
> I need to test each transaction listed in a Transaction table to find out if
> , as of "today",at least 14 days have past since the date listed in the
> "ClosingDate" field. If this is true I want to have a "yes" show up in a
> field called "is commission eligible to be paid?"
>
> I also may need to test for other conditions in order for the yes to show.
>
> I am totally at a loss for the proper way to put the expressions together.
> Any help would be greatly appreciated.[/color]
Something like this in the control source of an Unbound control on a
form, report, or as an expression in a new column in a query:
=IIf(DateDiff("d",[ClosingDate],Date())>14,"Yes","No"))
This should not be stored in any table. Whenever you need the
information, run the calculation, as above.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email. |