Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2013, 04:31 PM
Authorized User
 
Join Date: Sep 2010
Posts: 45
Thanks: 12
Thanked 0 Times in 0 Posts
Default Set up a schedule for running macro automatically

Hello Every one,

I have to set up a schedule (Access 2007) for running macro every day. I wrote this code in my main form, but it didn't work. please help!

Private Sub Form_Current()

If Time > "19:05:00" And Time < "19:10:00" Then

Dim stDocName As String

stDocName = "Report_1"
DoCmd.RunMacro stDocName

DoCmd.Close acMacro, stDocName

End If
End Sub

Thanks,
Cindy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Schedule a VBA macro to run at a specific time marshall04b Excel VBA 8 October 31st, 2015 08:41 AM
Schedule Excel to run a macro at a specific time and date SheriV Excel VBA 4 March 18th, 2009 04:12 PM
Schedule a VBA macro to run at a specific time peterlihh Other Programming Languages 0 October 24th, 2008 07:15 PM
Probs while running macro anukagni Excel VBA 2 February 2nd, 2006 03:29 AM
long running backup schedule prakashvj SQL Server 2000 1 June 9th, 2003 10:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.