Set Warnings On / Off in macro
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 ?
Thank you for taking the time to report an issue.
What's wrong... Please write below.
How to you turn those off in Access
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?
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
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.
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:
DoCmd.OpenQuery "qryAllAttendanceData", acViewNormal, acEdit
I don't think it's working - can an autoexec function be a module rather than a macro?
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
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.