Can I Remove Append query warning via VB code?

sphynx

Registered User.
Local time
Today, 02:52
Joined
Nov 21, 2007
Messages
82
Not sure if this should go here or in the queries forum?

I have a projects database near completion that I need to distribute across 30 + users, some don't have access while other have 03 and 07.

I have split my database into FE & BE, I have compiled my code and created an MDE front end to distribute. I have packaged this all into an installer which registers all the OCX & DLL files that my database requires & also installs Access Runtime if applicable.

Up to this point everything works perfectly my last problem is the append query warning within my FE when certain actions are performed.

I know how to manually alter this option within individual users Access but not how to do it within an Access Runtime environment. I would like to be able to do this when the MDE is opened via VB code.

All my queries are currentley run via the command "DoCmd.OpenQuery" within VB, ideally I would like to set this globally rather than recode every action query statement in my VB, is this possible?

If someone could please point me in the right direction I would be most grateful, as its the last piece of a rewarding but frustrating puzzle!
 
Last edited:
Have you used the DoCmd.Setwarnings False/True command?

If you wrap this around your action queries it will prevent the normal access dialog box appearing.

David
 
My personal preference is to simply use CurrentDb.Execute instead of DoCmd.OpenQuery or DoCmd.RunSQL

Code:
CurrentDb.Execute "<Either a Query name or a SQL statement>;", dbFailOnError

No need to turn on/off warnings.
 
No I haven't, do I place this before the my query action ie:

Code:
DoCmd.Setwarnings False
DoCmd.OpenQuery ("QueryName")
 DoCmd.Setwarnings True

Thanks for the quick response
 
In short Yes, but as suggested if you use the .Execute version you cut down the programming lines from 3 to 1. Mine was the first solution that came to mind, and the most common.

David
 
Thanks to both of you, the last piece is now complete & I am a very happy Bunny as this is my first full scale package and deployment project complete!

I now have the joy of user training to contend with!!!!!!!!!!!!!
 
Don't forget your user guide and supporting documentation:cool:
 

Users who are viewing this thread

Back
Top Bottom