Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Field= Todays Date - CheckOutDate

0 views
Skip to first unread message

Katayon

unread,
Feb 2, 2004, 2:25:06 PM2/2/04
to
Hi,

The database is a software library.
I have a field in a database called OverDue.
I would like this field to calculate the OverDue date,
i.e. today's date subtracted by the checkout date.

Can someone please let me know how to do this as soon as
possible. I really appreciate it.

Thanks,
Katayon

John Vinson

unread,
Feb 2, 2004, 4:43:09 PM2/2/04
to

Well... DON'T.

If you put a value in this field today, IT WILL BE WRONG TOMORROW.
Guaranteed!

Instead, calculate it on the fly. Create a Query based on your table,
and in a vacant Field cell type

OverDue: DateDiff("d", [CheckOutDate], Date())

to calculate the number of days since the checkout date. Subtract 14
or however many days before the item becomes overdue.

This calculated field can be used for searching, for sorting,
displayed on a form or report - the only thing you can't do is edit
it.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public

0 new messages