turning off action query

Forum 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

resolvedResolved · 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


 

Access tip:

Using the Quick Access Toolbar in Access 2010

The Quick Access Toolbar is included in virtually every Office product, including Outlook 2010, Word 2010, Excel 2010, and PowerPoint 2010.

You will find the Quick Access Toolbar in the top-left side of the window. To begin, click the Customize button (it's the little black arrow at the end of the toolbar).

Simply click the commands you want to include.

Virtually any command can be added to the Quick Access Toolbar. Click the More Commands option and a new window will open from where you can browse the commands including those not on the ribbon.

View all Access hints and tips


Server loaded in 0.05 secs.