Form Error Event

Posted on 2011-10-24
Last Modified: 2012-05-12
Is there a way to do a global function in an Access Form property Form Error event?

The Form - Form Error event looks like this:
     Private Sub Form_Error(DataErr As Integer, Response As Integer)

I can build code inside or call a Global Function from inside and use the DataErr (error number) and send back a Response =acDataErrContinue if certain conditions are met.

My question is there anyway to do this by just inserting a Global Function in the property sheet and pickup DataErr and be able to send back a Response - eg

Thanks in advance for any help

Question by:LJG
    1 Comment
    LVL 75

    Accepted Solution

    You really want this:

    Seriously ... it's off the chart as I noted.

    RE "=MyFormsError([DataEr],[Response])"

    I've never seen a way to do that.  vbWatchdog has a different way of tapping into the error system.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now