
Date change at midnite - open form
Set the datecontrol to current date when the form is open. Set up the
form's timer to run periodically and get the system date and check if
system date is different from the date in your control.
Or if you just need the current date without any checks , set up your
timer event to update the control with system date say every 10
minutes.
Nirmala Sekhar
-----------------------------------------------------
Monthly newsletter on Microsoft Access at
http://www.saicomsystems.com/index.asp?id=tips
Fortnightly newsletter on motivational quotes
http://www.saicomsystems.com/index.asp?id=mind
******************************************************
On Sun, 11 Jul 1999 23:55:46 -0700, "John Hanak"
Quote:
>I am having trouble with a module I wrote to return the current date, when
>the date changes at midnite. I am using the module in a form as a custom
>counter. The counter returns the Julian day of year and a sequencial number.
>When the date changes the counter is reset to 1. The difficulty I am having
>is that the form / module returns the date the form was opened and will not
>update to the 'true/new day' current system date until the form is closed
>and reopened. I suppose that I could close the form and reopen it when the
>user goes to a new record, but I would think there is a better way to get
>the 'true' current system date when the date changes while a form is open.