Update table field at a determined time

J

Johan

Hi people!

Can anybody help me with this;
I need a following function for a MS Access database. I have a column
in a table that i need to automatically get updated at a certain time,
i.e. when the year changes all the values in the column should be
changed to null. How can I make this function? A macro? Could anybody
help me with an example or a explanation of this?

BR, Johan
 
M

Marin Kostov

I have and idea...
Just make a new form. Call it StartUp (something like in Northwind). Make
that form StartUp - from Tools - StartUp.
Design the form, write something like Bla-Bla, I will check if the time for
update is right now. And in the Form_OnLoad Event Procedure just check if
the time is 01/01/2005, for example. Or check if it is the beginning of the
year. If yes, run an update query, with a macro, or with code. You need of
course to design that query in advance.
After running the query, close the StartUp form and run the database, or
display the main database window. Again, you can find example in Northwind.
If the date has not come for update, just close the main form with a code,
and run the database, as mentioned above.
I hope this will help.
 

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