Stop promtpting DelQry

  • Thread starter Thread starter Maxwell
  • Start date Start date
M

Maxwell

I made a 'Delete' query. It works fine.
My issue is that every time I run it, it prompts me
telling me it is about to delete X amount of rows.

I am confient of what I am deleting all the time now.
How do i bypass it so that it stops prompting me?

Reason is that I want to run a series of these delete
querys in a 1 button macro without clicking the OK button
100 times.

Thanks
 
I made a 'Delete' query. It works fine.
My issue is that every time I run it, it prompts me
telling me it is about to delete X amount of rows.

I am confient of what I am deleting all the time now.
How do i bypass it so that it stops prompting me?

Reason is that I want to run a series of these delete
querys in a 1 button macro without clicking the OK button
100 times.

Thanks

Add a Macro SetWarnings False as the first of the macros you are
running, then SetWarnings True as the last one in the list.

If you are using code, it would look like this:

DoCmd.SetWarnings False
DoCmd.OpenQuery "DeleteQuery1"
DoCme.OpenQuery "DeleteQuery2"
etc.
DoCmd.SetWarnings True

Why aren't you taking advantage of the error handling capabilities
available by using VBA Code?
 
Back
Top