How do I show the clients that have dates that are expired?

  • Thread starter Thread starter babyface77071
  • Start date Start date
B

babyface77071

I'm trying to make a database where I can make note of our clients that have
expired Driver licenses and are up for renewal. How do I get the database to
automatically highlight or bold or just indicate the dates that are expired
or are getting to the renewal time?
 
Assuming that you have a Date/Time field with either the expiration date or
the renewel date, you create a query with the appropriate criteria.

For example if you have an ExpDate field in the DriverLicense table, you
could do something like this:

SELECT *
FROM DriverLicense
WHERE ExpDate - 30 < Date() ;

This will return any records that are within 30 days or expiring or are
expired. Date() returns the current date in the computer.

You could also use conditional formatting of the ExpDate field in a form or
report to show dates that are expired by making them bold or red or
something. The logic would be similar to the WHERE statement above.

For either to work the ExpDate field must be Date/Time data type and NOT a
Text field that looks like a date.
 
Back
Top