How do I make a database update a number each day

J

Jo

I want to add a number to my database, i.e, if someone has not attended a
course for 60 days I want the database to add 1 day each day I open up a
database so it reads 61 days and so on, does that make sense to anyone!!
 
D

Douglas J. Steele

You shouldn't store calculated values. As fellow Access MVP John Vinson
likes to say "Storing calculated data generally accomplishes only three
things: it wastes disk space, it wastes time (a disk fetch is much slower
than almost any reasonable calculation), and it risks data validity, since
once it's stored in a table either the Total or one of the fields that goes
into the total may be changed, making the value WRONG."

Instead, create a query that computes the value by using the DateDiff
function on the last attended date and the current date, and use that query
rather than the table.
 
K

Kirstie Adam

not related to the question, sorry!
but i keep seeing "OP" mentioned in some posts and wondered what it stands
for?
 
J

John W. Vinson

but i keep seeing "OP" mentioned in some posts and wondered what it stands
for?

Original Poster - the person who started the thread.

Often comes up when (as in this case) an answer sparks a discussion between
multiple people, and it gets hard to figure out who asked what.


John W. Vinson [MVP]
 
Top