From: Owl on
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

"Steve Schapel" wrote:

> 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" <Dougie(a)discussions.microsoft.com> wrote in message
> news:E8F78F29-6E8C-44E3-BC10-8ECE368E0319(a)microsoft.com...
> > 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
>
>
>
>
 | 
Pages: 1
Prev: Count Function
Next: invio ricezione e.mail