Solved

Timer on Access Command Button

Posted on 2013-11-01
3
584 Views
Last Modified: 2013-11-01
Using Access 2007 and using VBA.
Is there any way for a timer to be put on command button that you could not fire it 5 minutes before the hour and 10 minutes after the hour.

Private Sub Command0_Click()

End Sub
0
Comment
Question by:ca1358
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 250 total points
ID: 39617540
you could put code in the timer event of the form and set the forms timerinterval to 30000 (30 seconds).

Private sub Form_Timer

me.cmd_YourbuttonName.Enabled = Minute(Now()) >= 10 AND Minute(Now()) < 55

End Sub
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 39617565
you also need to set the focus to other control to enable/disable the command button

if the command button has the focus, you will get an error.
0
 

Author Closing Comment

by:ca1358
ID: 39617724
thank you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question