Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

turning off action query

Forum home » Delegate support and help forum » Microsoft Access Training and help » Turning off action query notices Q for Anthony

Turning off action query notices Q for Anthony

ResolvedVersion 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:

Combo box for finding records

You can use a combo box in a form to look up a record. If you place the comb box in the Form header, by then selcting they a field type from the drop down loist, you will see the record for it

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.