Topics Search

Set Warnings On / Off in macro

Set Warnings On / Off in macro
Views: 11
In 2003, when creating a macro, I had the option as a drop down to set warnings = False, insert commands, then at the end of my macro process, insert a line using the dropdown to set warnings = true (it might be YES/NO, I don't remember).

In 2007, I don't have the option, UNLESS I import an .mdb - is there a way I can 'force' this same procedure in amacro, or do I have to use a function ?
Sponsored Links:

More topics


Set Warnings Off

Just upgraded to Access 2007. There used to be a feature in Macros to Set Warnings to off - so when your macro was running update or append queries you didn't get a message.

How to you turn those off in Access

Set warnings in Access 2007

I have update and make table queries in Access 2007 and I want to disable the warning messages that appear when the macro runs. In previous Access versions it was easy to add 'Set Warnings off" in the macro, but that does not appear to be an option in 2007.

I have searched on line and done all of the fixes for trusted directories, etc. I can not select the 'message bar' in database tools, as it is greyed out.

Also greyed out is the 'convert macros to Visual Basic', as well as many other options. Why?

Warnings off, but still get pop-up

I have a simple Output macro that exports a table to Excel. My warnings are off, but I still get asked if I want to replace the existing file. How do I eliminate this

WHY isn't setwarnings *working*!?

I normally set the warnings equal to false, run some recordset loops that throw down some maketables, and then set my warnings to true. For some reason it isn't working in this particular database and it is driving me crazy. Under what circumstances would setting warnings to false NOT suppress the "you're about to delete this table / run a maketable / etc" warnings?

Linking Macros/Modules to a form Control (?)

I would really appreciate any help you can give - I am not very good with the modules side of things in Access so laymans terms would be useful

I have multiple make table queries that are being linked to excel. The only problem is that the macro that intiates these queries has 3 message box/warnings per report (and Set Warnings can't be turned off in the macro in MSA2007).

I was told that you can create a module to run on "click" on a form say, and turn off warnings and turn them back on after the module has executed. My problem is I don't know how to do this!

For example my Make Table query names are:


Could anyone share the required code and explain how I would link this to a button control

Access 03 Autoexec

I know this has been beaten to death but I still need help. I need an Autoexec macro to turn off warnings for action queries.

I've create the macro, named it Autoexec, chose the SetWarnings action, set it to False. When I run queries I still get the pop up asking if I'm sure I wanna.blah blah I've also set the macro security setting to low.

Make Table on Start up - Autoexec?

I have a 2007 database that on startup needs to replace a table of student attendance as this makes is easier to report on.

I can easily set up an autoexec macro to do this but get the warnings messages. I tried to get around it by converting the Macro to a Module and editing is so:

Function autoexec()
DoCmd.OpenQuery "qryAllAttendanceData", acViewNormal, acEdit
End Function

I don't think it's working - can an autoexec function be a module rather than a macro?

Errors but not warnings ?

I have created a script (VBA program) which runs a chain of queries to do some simple processing. The queries will run either using currentdb.execute (with SQL) and/or docmd.openquery (with the SQL written to the appropriate query).

As it is, I have opted for docmd.openquery because this gives me the option to switch warnings on (docmd.setwarnings true) in order to check the work of the queries.

However, what I would really like to be able to do is to switch warnings off but tell the system to report errors if they occur.

So my question is whether this is possible? Can I tell the queries to report errors but not warnings

Microsoft Access 2007 - Managing Macro Security

Learn why signing your own macros will reduce the number of security warnings you see while still maintaining a high security level, and find out how to sign a macro by using self-certification.

Append query runs on its own but not in a macro

A database I created for a client some years ago has a macro which contains an append query. This macro repeats itself until a condition is met and has run thousands of times without any problem.

The client has asked that I make the database work for multiple factories. Without going into too much detail the same macro and append query are needed in the spin-off databases (one for each factory).

The problem is that the append query will not run in any of the spin-off databases as part of the macro although the macro itself is unchanged, but will run in isolation when it performs correctly and gives no error messages. I have run the macro with SetWarnings ON, but only get the warnings that you would normally expect.

I have pasted over the macro, the append query and the underlying select queries from the original database, but to no effect.