Skip to content

Unwanted Error Message

How to suppress the “OpenForm action was canceled” message.

Q: Nick Els finds that when he runs a report from a form, even though he has a message on the report’s NoData event, he still gets an annoying error message stating that the OpenForm action was canceled, and he wants to know how to suppress this message.

A: This message can be suppressed by doing a Count on the report’s recordset before opening the report, and only open it if there are some records that meet the report’s criteria. If desired, an informative message can be popped up if the Count = 0.

About this author

Office 2024 - all you need to know. Facts & prices for the new Microsoft Office. Do you need it?

Microsoft Office upcoming support end date checklist.