If you are executing the macro from some other place than this code snippet,
you will have to modify the macro. Since I almost never do a macro I have
no idea how you could do that.
In the macro you should be able to use a condition to run or not run a macro
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Siritl via AccessMonster.com" <u35179@uwe> wrote in message
news:760ab00d1acbd@uwe...
> Ok, thank you!
> But the code still doesn't work. Do you know what I can write to stop the
> macro from running?
>
> John Spencer wrote:
>>IF Time() <= #18:00:00# THEN
>>
>>Dates and times are delimited using # marks not " marks.
>>>I have a macro that loops 3 forms in Access. I would like to write a code
>>> preferabelly in VB that stops these macros when time reaches 18.00. I
>>> have
>>[quoted text clipped - 11 lines]
>>>
>>> End Sub
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200708/1
>