From: Rick Brandt on 18 May 2010 02:27 Owl wrote: > 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. Does the Quit macro (when not using the runtime) close Access entirely or just the file currently opened? The runtime cannot be used without a file opened so the latter would not be allowed.
From: Owl on 18 May 2010 09:49 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. I appreciate being told that immensely. Every bit I can learn about Runtime helps a lot because I am really floundering with it. So, how can I have something on my switchboard to exit Access then? "Rick Brandt" wrote: > Owl wrote: > > > 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. > > Does the Quit macro (when not using the runtime) close Access entirely or > just the file currently opened? The runtime cannot be used without a file > opened so the latter would not be allowed. > . >
From: Owl on 18 May 2010 09:56 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 "Rick Brandt" wrote: > Owl wrote: > > > 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. > > Does the Quit macro (when not using the runtime) close Access entirely or > just the file currently opened? The runtime cannot be used without a file > opened so the latter would not be allowed. > . >
From: Dirk Goldgar on 19 May 2010 15:18 "Owl" <Owl(a)discussions.microsoft.com> wrote in message news:B0D241A6-5E82-4949-B912-CC0D4BB178B1(a)microsoft.com... > 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. I don't think Rick means that at all. I think he means that the runtime won't let you close the current database without exiting Access. I don't know if that is true or not, but it makes sense. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: Dirk Goldgar on 19 May 2010 15:25 "Owl" <Owl(a)discussions.microsoft.com> wrote in message news:8C087CA9-6B04-4ACF-93FD-3890E1C5E2B4(a)microsoft.com... >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 I don't have a problem with either the Quit action in a macro or the DoCmd.Quit method in VBA when running Access with the /runtime switch. I don't have a runtime-only system to test on, but I don't think this can be the basis of your problem. It seems to me that your error message, "You can't carry out this action at the present time," must be a clue to what is going on. Possibly there is something going on in the database when you click the Quit button that is either happening in runtime but not in normal mode, or vice versa. Is there a record on a form that has been modified but can't be saved? Is there an object whose design you have modified and can't save? What happens if you open the database with no other objects open except a simple unbound form that has only a button that invokes your Quit macro. Does it still fail? -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: #### in Access Pivot Tables Next: what do i do if product key i hav got is being shown invalid |