O
Owl
This is the very first time I am using Runtime. I am using Runtime 2007 and
my Quit macro isn't working. What can I do about it?
Thanks for any replies.
my Quit macro isn't working. What can I do about it?
Thanks for any replies.
Owl said:This is the very first time I am using Runtime. I am using Runtime 2007
and
my Quit macro isn't working. What can I do about it?
Thanks for any replies.
Owl said:Thank you for your reply, Dirk.
The actions in my Quit macro (which works - to exit the database - on
every single other database I use OUT of Runtime) are simply Quit (and of
the options to Save or Prompt or Exit, I have selected Exit).
By not working, I mean it comes up with the following error message (THEN
paradoxically carries out the action requested):
You can’t carry out this action at the present time.
You tried to run a macro or used the DoCmd object in Visual Basic to carry
out an action. However, is performing another activity that prevents
this action from being carried out now.
For example, no actions on a form can be carried out while is repainting
a control or calculating an expression.
Carry out the action later.
Then there is an OK button and when I press the OK button, I am taken out
of the database as I wanted to be immediately with no further problem, but
I don't want the error message coming up.
The macro is invoked from a switchboard.
So far, I am using my database with Runtime on a computer WITH Access
2007, but am hoping to be able to try it out on a computer without Access
tonight -
hopefully I will have the Quit problem sorted out by then. I have Runtime
and my small simple application database file (not split - I am going to
try to do it with a copy of the database split when I have mastered this
unsplit one) in the same folder.
I have made the folder that they are in, a Trusted Location.
Owl said:Thank you for your reply, Rick. The Quit macro (when not used in
Runtime),
closes Access entirely. I think you meant that the former (being, closing
Access entirely) won't work.
Owl said:I forgot to say that after I discovered the problem with I converted the
macro Quit to VBA and it is the following (but still coming up with the
same
error message):
'------------------------------------------------------------
' Quit
'
'------------------------------------------------------------
Function Quit()
On Error GoTo Quit_Err
DoCmd.Quit acExit
Quit_Exit:
Exit Function
Quit_Err:
MsgBox Error$
Resume Quit_Exit
End Function
Owl said:I did what you asked and opened the database with
no other objects open except a simple unbound form that has only a button
that invokes your Quit macro. It worked. However, I need the macro to
run
from the switchboard.
Owl said:Thanks, Dirk. Here is the code for my Switchboard. Yes, I fiddled with
it
here and there, but I think it is back to what it was before (or at least,
more or less), except for the WarningsOn on Close.
Option Compare Database
Private Sub Form_Close()
DoCmd.SetWarnings (WarningsOn)
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.