Compare Control Time to System Time

  • Thread starter Thread starter Brigham Siton
  • Start date Start date
B

Brigham Siton

We are trying to create something like a scheduler where we have a control
that contains time (hh:mm) format.

We would like to compare it to the computer time then it triggers an event
if the control time and system time matches.

What I did so far is that I have a form with that control that I have
minimized. I setup the timer to 10000 (10 seconds) and created an event:

If me!ctrltime = Time() then
docmd.maximize
end if

Unfortunately, its not working. Can somebody advise me on the best way to
do this or what am I doing wrong?

Thank you in advance.
 
I think you're being too precise...if the tick even happens a millisecond
earlier or later, you're not going to catch it. Why don't you try using >=
rather than just =?

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
Thank you very much. However, it will open up all the future times and not
specific.

Just to give you an idea on what I am trying to accomplish, we would like to
create a sort of a scheduler that when the time is due, it will maximize the
form withe the list of things that are due. However, we do not want to show
things that are probably 1 hour of due time.

Can we do a something like a DateAdd for Time? Because we can pinpoint the
difference to nearest 5-minute marker or even 2-minute marker. Can we
perform a calculation based on time?

Thank you.
 
Back
Top