Re: How do I suppress warnings when using an Access MDB as a runti

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tim Petlock (Petlock_at_discussions.microsoft.com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 03:33:01 -0800

Thanks, between the registry edit for the security key and a little added VB
function to suppress the warnings, that did the trick.

I've attached the VB function in hopes that it helps future searchers. You
just have to add a module to your access project and call the function just
like any of the built in (i.e. string manipulation) functions.

Function shut_up() 'suppress the darn warnings
DoCmd.SetWarnings False
End Function

-Tim

"'69 Camaro" wrote:

> Hi, Tim.
>
> > I need to deploy this on a server. What's the most painless way of
> > re-suppressing all these warnings when using this mdb with the run-time
> > version of access? The program works in the run-time version of access,
> but
> > the execution starts with "Security Warning: unsafe expressions are not
> > blocked" and for every query that modifies a table it throws up another
> > warning.
>
> The destination computer can have the macro security settings set to Low to
> avoid the three warning messages. One may do this by changing the Windows
> Registry settings or with code that can be saved in a module in Microsoft
> Access and later run on the computer. The necessary steps for the Registry
> changes and the code (in both English and Spanish) are located on this Web
> page:
>
> http://www.Access.QBuilt.com/html/vba.html#SetMacroSecLvl
>
> > I have tried digitally signing the original project and that doesn't
> > suppress the first warning, although it should.
>
> Does the destination computer have the digitial certificate's key in the
> computer's root store? If not, the digital certificate won't be recognized.
> Does the destination computer have the macro security setting on high? If
> so, then a self-certifying digital certificate is not acceptable, and the
> level will need to be set at medium or lower. Does the destination computer
> have Jet 4.0 SP-8 installed? If not, unsafe expressions cannot be blocked.
>
> > As I developed it, I suppressed the "you are about to make changes"-type
> > warnings you get when you run an update or delete query.
>
> <SNIP>
>
> > But how can I suppress the
> > other ones?
>
> The Access Runtime version lacks the built-in menus, so the user is unable
> to change this Windows Registry setting from the Access interface. The
> Access developer needs to do extra work when distributing the application as
> a Runtime version. One can create a custom menu that allows the user to
> change this setting, or one can use the DoCmd.SetWarnings False method in
> VBA code to suppress the warnings before the action query is run and
> DoCmd.SetWarnings True method in code to turn the warnings back on
> afterwards. One can also use the DAO.Database.Execute( ) method with
> dbFailOnError in VBA code to execute the action queries.
>
> HTH.
>
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips.
>
> (Please remove ZERO_SPAM from my reply E-mail address, so that a message
> will be forwarded to me.)
>
>
> "Tim Petlock" <Tim Petlock@discussions.microsoft.com> wrote in message
> news:A18EF08D-E145-4956-B635-B0F6BA9948FC@microsoft.com...
> > I have an Access mdb file that works perfectly in the full version of MS
> > Access. The purpose of the mdb is a log parser - it simply looks for a
> tab
> > delimited text file, and imports it into a table. Bits of the file get
> > spread across three other "work" tables using update, append and delete
> > queries and ultimately the interpreted version of the log is appended from
> > one of the "working" tables to a history table. The program then deletes
> all
> > records from the work tables, calls a VB function to see if its monday and
> if
> > so, outputs reports as html to a directory. Finally, it exits, compacting
> > the database on exit.
> >
> > As I developed it, I suppressed the "you are about to make changes"-type
> > warnings you get when you run an update or delete query. I have macro
> > security set to low and as such my mdb file starts, processes, creates
> > reports if necessary, compacts the database and then exits, all without
> any
> > intervention.
> >
> > I need to deploy this on a server. What's the most painless way of
> > re-suppressing all these warnings when using this mdb with the run-time
> > version of access? The program works in the run-time version of access,
> but
> > the execution starts with "Security Warning: unsafe expressions are not
> > blocked" and for every query that modifies a table it throws up another
> > warning.
> >
> > I have tried digitally signing the original project and that doesn't
> > suppress the first warning, although it should. But how can I suppress
> the
> > other ones?
> >
> > Thanks.
>
>
>



Relevant Pages

  • Re: How do I suppress warnings when using an Access MDB as a runti
    ... > function to suppress the warnings, ... And you added a public VBA function to turn the warnings back on, ... >> The destination computer can have the macro security settings set to Low ...
    (microsoft.public.access.security)
  • Re: Link Warnings
    ... Used LDEFINES=$/IGNORE:4210 in appropriate SOURCES file, ... gets rid of 4210 warnings and others but will not suppress 4099. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Are compiler #Pragma equivalents supported in C#?
    ... This allows you to specify which warnings to not have ... There is a property "Suppress Specific ... > I'm looking for a way to suppress the CS0659 compiler warning message about> class overrides Equals but does not provide a GetHashCodeoverride. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: A 6% fix from Microsoft Security Bulletin MS03-040 - 828750
    ... We has spend tons of money on security (firewalls, DMZ, ... > as big a fuss about even the trivial stuff as they do about the serious ... > the warnings?" ... their customers about potential vulnerabilities in their products - they are ...
    (microsoft.public.security)
  • Re: A 6% fix from Microsoft Security Bulletin MS03-040 - 828750
    ... We has spend tons of money on security (firewalls, DMZ, ... > as big a fuss about even the trivial stuff as they do about the serious ... > the warnings?" ... their customers about potential vulnerabilities in their products - they are ...
    (microsoft.public.security.virus)