W
Wendy
Hi,
I would like to be able to close Access, after a macro procedure runs in the
middle of the night - close at 3am.
By searching on this site, I have found coding that will:
* Application.quit if you click a text box
I also found another method that indicated a set time to close down, but got
very confused as to how to set it up, as the database does NOT currently have
a form (used only for website backend)., and the notes seemed to indicate
that this was essential?
By playing around, I also found that I could add the 'Exit' command to the
AutoExec macro, but this ended up being a mistake - while it functioned
exactly as required, I then can't get back into the database to remove it or
make changes, either!
Is there no simple little .exe file around that will do this simple task,
that I can set up to a Windows Scheduled Task?
Otherwise, please help with further instructions as to setting up the Timer
sequence, I am so confuseddd......
This is what I have - copied from another posting:
Private Sub Form_Time()
If Now() > TimeValue("03:00") Then
Application.Quit
End If
End Sub
I can type this into the Module area and save it, but am not sure how to
start the timer event to check the time. Or how to do what I am trying to
achieve here?
I can create a simple form, and open it via the AutoExec macro after other
stuff is done, so a timer event can be linked to a form that is then open,
but is this the correct way to go on this?
Please help, very confused on this one last bit of coding to make everything
work as it needs to.
TIA
I would like to be able to close Access, after a macro procedure runs in the
middle of the night - close at 3am.
By searching on this site, I have found coding that will:
* Application.quit if you click a text box
I also found another method that indicated a set time to close down, but got
very confused as to how to set it up, as the database does NOT currently have
a form (used only for website backend)., and the notes seemed to indicate
that this was essential?
By playing around, I also found that I could add the 'Exit' command to the
AutoExec macro, but this ended up being a mistake - while it functioned
exactly as required, I then can't get back into the database to remove it or
make changes, either!
Is there no simple little .exe file around that will do this simple task,
that I can set up to a Windows Scheduled Task?
Otherwise, please help with further instructions as to setting up the Timer
sequence, I am so confuseddd......
This is what I have - copied from another posting:
Private Sub Form_Time()
If Now() > TimeValue("03:00") Then
Application.Quit
End If
End Sub
I can type this into the Module area and save it, but am not sure how to
start the timer event to check the time. Or how to do what I am trying to
achieve here?
I can create a simple form, and open it via the AutoExec macro after other
stuff is done, so a timer event can be linked to a form that is then open,
but is this the correct way to go on this?
Please help, very confused on this one last bit of coding to make everything
work as it needs to.
TIA