Access 2007 runtime - how to switch off confirm action queries

D

Dougie

I have successfully created a runtime package in Access 2007 but when it is
run it demands confirmation of action queries although switched off in the
original. How can I switch this off in the published version?
 
S

Steve Schapel

Dougie,

If you are using OpenQuery macros to run the action queries, precede the
first OpenQuery action with a SetWarnings/No action.

If you are running them in VBA, using OpenQuery method, put:
DoCmd.SetWarnings False
.... before the line running the query, and:
DoCmd.SetWarnings True
.... afterwards.
Alternatively, consider using CurrentDb.Execute to run the queries in code,
instead of DoCmd.OpenQuery

--
Steve Schapel, Microsoft Access MVP


Dougie said:
I have successfully created a runtime package in Access 2007 but when it
is
run it demands confirmation of action queries although switched off in the
original. How can I switch this off in the published version?



__________ Information from ESET Smart Security, version of virus signature database 4251 (20090716) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
D

Dougie

Steve Schapel said:
Dougie,

If you are using OpenQuery macros to run the action queries, precede the
first OpenQuery action with a SetWarnings/No action.

If you are running them in VBA, using OpenQuery method, put:
DoCmd.SetWarnings False
.... before the line running the query, and:
DoCmd.SetWarnings True
.... afterwards.
Alternatively, consider using CurrentDb.Execute to run the queries in code,
instead of DoCmd.OpenQuery

--
Steve Schapel, Microsoft Access MVP






__________ Information from ESET Smart Security, version of virus signature database 4251 (20090716) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Steve
Many thanks, that has done the job nicely.
Regards
Dougie
 
O

Owl

Steve, I have the same problem. I am working on a database to run in
Runtime. I am running them in macros. I used your code to get the Warnings
Off, but I can't get them back on again. I tried putting a Warnings On
message in the macro after Open query and it had not effect at all. I tried
putting the Warnings On message in my startup form in first Close and then
Offload. I had something else that worked, as long as I go out of the
database and Access via the switchboard, but Exit Application Function
doesn't exit Access and the Quit macro doesn't work (It says: 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, (word missing
and extra space in its place) is perfoming another activity that prevents
this action from being carried out now. For example, no actions on a form
can be carried out while (word missing and extra space in its place) is
repainting a control or calculating an expression. Carry out this action
later.)

As things stand, other databases have their Confirmation of Action queries
turned off after I have exited the database with the above.

Please help me either:

find a way of exiting Access through the switchboard in another way

or

of getting my warning messages turned back on again after my queries (I have
an update one as well, that clears a check box field) have run.

Owl
 

Ask a Question

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.

Ask a Question

Top