Share via

Macro SetWarnings On/Off - Where is it in Access 2013?

Anonymous
2014-09-05T19:32:41+00:00

When I was developing Access macros in prior versions of Access, I could use SetWarnings On to Yes or No.

I can't find this in Access 2013.  I'm running a macro with 44 update queries and for each one I get two or three annoying message boxes telling me what's about to happen and I have to click Yes on each one to proceed.

Anybody have an answer for this?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2014-09-05T19:42:24+00:00

    On the Design tab of the ribbon, in the Show/Hide group, click to highlight the Show All Actions button. The SetWarnings action will then be available.

    If this button is disabled/greyed out, you need to make the folder containing the database a trusted location for Access, or make the database a trusted document.

    Was this answer helpful?

    100+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-09-05T19:58:21+00:00

    It worked!

    Thank you very much.

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2014-11-15T14:13:13+00:00

    Great, Thanks so much.  WV

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2014-11-14T20:58:56+00:00

    you're looking in the wrong place. SetWarnings is a feature of Macros (which can also be used in VBA). It's not part of Query design.

    To run an update query without warnings you can use the RunSql action from a Macro, just include a line in the macro to SetWarnings False prior to running the query.

    Better, however, is to execute the query from VBA code using the Execute method; this not only suppresses warning messages, it lets you trap errors as well:

    Dim db As DAO.Databse

    Dim qd As DAO.Querydef

    On Error GoTo Proc_Error

    Set qd = db.Querydefs("NameOfMyQuery")

    qd.Execute dbFailOnError

    Proc_Exit:

       Exit Sub

    Proc_Error:

       MsgBox "Error " & Err.Number & " executing NameOfMyQuery:" & vbCrLf & Err.Description

      Resume Proc_Exit

    End Sub

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2014-11-14T20:52:15+00:00

    On ACCESS 2013 on my update query there is NOT a show all button, only totals Parameters, Propety Sheet, Table Names. Am I lookin in the wrong place?? WWV

    Was this answer helpful?

    0 comments No comments