Solved

Timer on Access Command Button

Posted on 2013-11-01
3
547 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
3 Comments
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 250 total points
Comment Utility
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 119

Accepted Solution

by:
Rey Obrero earned 250 total points
Comment Utility
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
Comment Utility
thank you!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now