98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Turning off action query notices Q for Anthony | Access forum
Turning off action query notices Q for Anthony | Access forum
Resolved · Urgent Priority · Version 2007
Timothy has attended:
Access Advanced course
Turning off action query notices Q for Anthony
Hi,
Having a problem with making this work. I know you can turn off the messages using advanced options through the microsoft office button. However I want it to happen in just the database I would open.
Have tried inputting DoCmd.SetWarnings(WarningsOn) = False, have done so without '=' sign. Did so following the example shown on office.microsoft website. I have put this in the on load event of the main form that the Db runs off hoping it would have the same effect as the ShowToolbar method for getting rid of the ribbon menu.
Am I just sticking it in the wrong place or have I got the code wrong.
Cheers
Tim
RE: Turning off action query notices Q for Anthony
Hi Tim, thanks for your query. Off the top of my head it's:
docmd.setwarnings false
docmd.setwarnings true
...but you should double check this.
If you have any queries like this going forward, don't necessarily flag them for my attention. You'll get a quicker answer if other trainers can pitch in without thinking this is question merely for me.
All the best,
Anthony
RE: Turning off action query notices Q for Anthony
Hi Anthony,
It is becoming a bit of a habit. Code works fine, the problem I have had and since dealt with is where and when you place the code.
I was looking to remove all warnings for the entire database but have not found where to put that. I have resorted to bracketing all the run action query code with warnings false and then warnings true and that has done the job. Shame as I have tons of action queries and I would have thought it would be possible to achieve a global turn off. Any thoughts on that specifically?
Cheers
Tim
RE: Turning off action query notices Q for Anthony
Generally, you would turn off the warnings upstream in some dashboard subroutine. It shoulds like you're turning them off at a granular level, rather than upstream. If you're having to do this because of the organisation of your queries, it's that organisation you'll have to change in order to control the warnings on a global scale.
Anthony
RE: Turning off action query notices Q for Anthony
That was my thinking initially but it didn't work for me. Having said that I am using a Form I built myself as a switchboard as I had problems with using the switchboard manager and getting it to do what I wanted. Are there some properties that I lose by not using the switchboard manager? If I put setwarnings false into a form event it would just function on that form, do I want to create a module with the code in it?
Not quite sure what you mean by query organisation, as the queries are opened based on what the user is doing and are all based off of form events so how I could go about re-arranging the organisation to suit?
Cheers
Tim
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Using the Quick Access Toolbar in Access 2010The Quick Access Toolbar is included in virtually every Office product, including Outlook 2010, Word 2010, Excel 2010, and PowerPoint 2010. |