jpkeller55
New member
- Local time
- Yesterday, 20:14
- Joined
- May 10, 2012
- Messages
- 9
I have a form (MS Access 2003) that has a button that when pressed, assigns the current time to field [Time1] using
I have another field [Time2] that adds 15 minutes to [Time1] using the following in the Control Source field
I was wanting to use these to force a message box when the system time reached Time2 and tried the following code on the Form ON TIMER event (Interval at 1000 ms) but it does not work.
I tried putting in a manual time in the VBA such as:
which worked. So, I am guessing there is something with my orignal code using Me.Time2 that is causing the problem. Any ideas?
Code:
Me.Time1 = Now()
Code:
=DateAdd("n",15,[Time1])
Code:
If Time() > Me.Time2 then
MSGBox "Time to show message"
End if
I tried putting in a manual time in the VBA such as:
Code:
If Time() > #2:05:00 PM#
MSGBox "Time to show message"
End if