Timer on Access Command Button

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
ca1358Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
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
 
Dale FyeConnect With a Mentor Commented:
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
 
ca1358Author Commented:
thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.