Matching system date/time with field date/time 
Author Message
 Matching system date/time with field date/time

I'm trying to get a database in Access 97 to call up a message box when a
date/time field in the database equals the system time. I want to be able
to set a date for a call to be made in the field and have the database
remind me when it is time to make the call. I'm at a complete loss as to
how to proceed. Any help would be appreciated



Thu, 09 Sep 1999 03:00:00 GMT  
 Matching system date/time with field date/time

You can use the TimerInterval property and the OnTimer event of your form.
For example:

In the OnTimer have this:
If Now() >[MyDateToCallField] then
        'put your code here
        Msgbox "Please call " & [NameTopCallField]
      Else
        'Nothing secial hapens if condition not true
End if
'reset the timer here so that it would do the checking again in 10 seconds
Me.TimerInterval = 10000

If you need a timer for any form you have opened on the screen you may want
to create a form only for the timer code and check and keep it invisible.

Hope this helped,

Ionut Iosub

http://junior.apk.net/~ionut/

Useful links:




Thu, 09 Sep 1999 03:00:00 GMT  
 Matching system date/time with field date/time

You could set up a form, turn on its timer event. Then maybe every so
many seconds have it check the current time with a value in a table.

Quote:

>I'm trying to get a database in Access 97 to call up a message box when a
>date/time field in the database equals the system time. I want to be able
>to set a date for a call to be made in the field and have the database
>remind me when it is time to make the call. I'm at a complete loss as to
>how to proceed. Any help would be appreciated

--------------------------------------
Chris kunicki
Access PowerUser Website  
http://www.spect-tech.com/msaccess/


Thu, 09 Sep 1999 03:00:00 GMT  
 Matching system date/time with field date/time

Hi,

I will follow Chris' suggestion, but set the TimerInterval to the
difference, in milliseconds, between the time required and now( ). This
way, the timer event will fire only once, exactly (almost, remember Timer
event are on a low priority like queue) when appropriate. If there are many
event to be driven by the same timer, I will take the first event to occur
in the future. Note that is there is no more event to be "scanned" for, you
will then set the timer interval to zero.

Hope it may help,
Vanderghast, Access MVP.



Mon, 13 Sep 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ADO with Access Date/Time field not storing the time, just the date

2. Compare date in form with date/time in form with date/time in database

3. combining a time and a date to one Date/Time value

4. start date/time, end date/time problem

5. how to set a date time value different from system time in the status bar

6. How to subtract a date-time from a date-time

7. Converting %date% %time% to VB Time/Date

8. Extracting the date out of a Date/Time field

9. Date part of Date/Time Field

10. Null date values in Date/Time fields in Access DB

11. CR8 Distinct dates in Date/Time Field

12. date/time field only shows date

 

 
Powered by phpBB® Forum Software