Due Date Warnings...?

Fulcrum

Registered User.
Local time
Today, 05:45
Joined
Aug 25, 2002
Messages
10
Just put together a small database for test equipment and would like to get the field that shows the "calibration due date" to be highlighted red 30 days before the "due date".
The idea being you can see at a glance which items will soon need calibration.
Any ideas would be most welcome.
Thanks.
 
OK, in forms this is easy. Look up the following items:

Now() - as a function
DateDiff - another function.

You can use DateDiff in the Form_Current event to compute whether the item is within x number of days from the indicated date by comparing the "due" date to Now() in units of days.

Then, if you want the control's contents to be displayed in red, you would use

[mycontro].ForeColor = vbRed

If not, you would use vbBlack instead.


In something that isn't a form, this is a lot harder and MIGHT be more trouble than it is worth.
 
I would create a query that selects the items due for calibration. You can run it when the db opens or you can put it in your switchboard for the user to run whenever he wants to run it. If you store DueDate, then use:

Select ProductID, DueDate
From YourTable
Where DueDate < Date() +31
Order by DueDate, ProductID;
 

Users who are viewing this thread

Back
Top Bottom