Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / May 2005

Tip: Looking for answers? Try searching our database.

Disable Action Failed Macro Message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen - 23 May 2005 23:12 GMT
On a form, I have a macro attached to a command button that saves the record
and previews a report.  If a field is not filled in according to the
validation rule for that field at the time the user clicks the button, the
Validation message appears and then the "Action Failed" message for the macro
appears.  The user has to click on "Halt" to continue.  Is there a way to
disable this macro message?
Ken Snell [MVP] - 24 May 2005 00:09 GMT
No, not directly. The error is not caused by the macro, but rather the macro
is failing because the validation test failed on the form. The way to avoid
the message is to not run the macro unless all the validations are ok.

I assume that you're using either table-level validation rules and/or
form-level validation rules. The only way to "trap" them is to use VBA code
in the form's Error event to test for and "swallow" those error messages.
But then you'd need to conduct the validation test in a different way
because it's obvious that you cannot save a record with invalid data.

Perhaps, you could remove the validation rules in the table and/or form, and
use a Condition in the macro to test for the validity of the data as the
first step; if the test fails, display an error message and stop the macro.

Signature

       Ken Snell
<MS ACCESS MVP>

> On a form, I have a macro attached to a command button that saves the
> record
[quoted text clipped - 4 lines]
> appears.  The user has to click on "Halt" to continue.  Is there a way to
> disable this macro message?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.