application defined or object defined error (1 Viewer)

skate

Registered User.
Local time
Today, 23:05
Joined
May 22, 2002
Messages
136
what does this mean? application defined or object defined error
it happens when i open a form
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:05
Joined
Feb 28, 2001
Messages
27,175
Access signals errors according to an error code number. The Err object's .Number property gets loaded with the code number when an error is signaled. Your error handler then can use the Err object's other properties (.Description, for example) to determine how to handle the condition. The numbers Access itself generates will fall in a certain numeric range. The standard Access handlers can detect and correctly identify everything in the standard range.

Access reserves another range (not overlapping the standard range) for user-defined errors that can be explicitly signaled. (See 'Raise' command in VBA) A user-defined, application-defined, or object-defined error is one that is in the numeric range outside that which Access claims for itself.

The problem you are having is that when a user-defined error is signaled (raised), a user-defined handler has to be declared first (On Error ...) that will recognize the error. The standard Access error handler is trapping an unhandled error signaled from some number of levels deeper in your code. When the Access last-chance handler detects this type of condition, it is just about uniformly fatal to what you are doing.

If the error is part of an application object, then you need to test for that application's error codes in your handlers. But more important, you need a low-level handler that can trap the error and correct it without passing it up to the higher level handlers. You already know THEY can't handle the problem.

That doesn't tell you where to look, I'm afraid. But I think that is what is going on. If you don't have any error handlers at all, that might be part of your problem. If you do, then the problem is that they are resignaling the error that is giving you grief because the handlers you have won't handle the error you got.
 

Users who are viewing this thread

Top Bottom