Checking dates

Oldsoftboss

AWF VIP
Local time
Tomorrow, 03:22
Joined
Oct 28, 2001
Messages
2,499
In our dept we have contract with many other companies. I've set up a form (datasheet view) with the details of each client, ie: who, hourly rate, etc and a contract renewal date.
Is there a way of checking the renewal date of each contract (record) when the form is open and flag it with a message box, (Such & such's contract runs out soon)?
Thanks in advance,
Dave
 
Set up an unbound text box. As the control source use the following...

=iif(datediff("d",[Renew_Date],date())<=5,"Contract About to Run Out!")

This will check if the renew date is within 5 days of the system date and put the warning on the form if it is, otherwise will print nothing. Hope this helps.

Doug
 
Doug,
Thank for you reply, works a treat,but (of course) can I pick the name of the contract that is up for renewal in the message.
I have an ORDER BY in the record source that sorts and puts the closest date at the top.

Alteratively, can I do it with code in a load event and simply bring up a msgbox ?

Thank for the progress thus far,
Dave
 

Users who are viewing this thread

Back
Top Bottom