View Full Version : Macro to update fields on open?


mariaw
10-12-2006, 06:11 AM
Hi

I want my database to update field in a table each time the database is opened.

The field in the table that I want to update is today's date: so that if I open the database today, it will be 12th October, if I open it tomorrow, it will change to 13th Oct?

Can I create a macro to do this or do I need to do something to the field itself? at the moment the default value is Now(). But once it is entered - it stays as is.

Also - to further complicate matters, I don't want the field to update where someone has actually gone in a typed a date in? (The field is supposed to contain the current date, until a user puts an "end date" in).

Thanks!!

Maria

Uncle Gizmo
10-12-2006, 02:00 PM
>>>I want my database to update field in a table each time the database is opened. <<<

If you name a macro autoexec it will run every time your database is opened.

mariaw
10-16-2006, 12:26 AM
Great thanks Uncle Gizmo - will give it a try!

M