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

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?
 
J

Jerry Whittle

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top