How to set warnings on/off in Macro

djroller1

New member
Local time
Today, 10:55
Joined
Sep 10, 2014
Messages
2
I'm trying to create a macro in Access 2013 that runs a series of database inserts (appends). Normally I would do this using vba:
Sub MasterDataSets()
DoCmd.SetWarnings (False)
DoCmd.OpenQuery ("9a_create_CallPlanTrackerNational")
DoCmd.OpenQuery ("9b_append_Central_to_CallPlanTrackerNational")
DoCmd.OpenQuery ("9c_append_West_to_CallPlanTrackerNational")
DoCmd.OpenQuery ("9d_append_NorthEast_to_CallPlanTrackerNational")
DoCmd.OpenQuery ("9e_create_NewDeliverableActivity")
DoCmd.SetWarnings (True)
End Sub

I would like to run this as an autoexec macro, but I can't find an option to suppress the warning messages in the macro commands.

Any thoughts?
 
Why not call the VBA subroutine from the autoexec macro? ( you can't call a sub routine but you can change it to a function and it will call)
 
That's also what I would do, but for informational purposes, in a macro there is a SetWarnings action, but you need to click on the Show All Actions button on the ribbon to see it.
 

Users who are viewing this thread

Back
Top Bottom