Custom error

  • Thread starter Thread starter Sergey Bogdanov
  • Start date Start date
S

Sergey Bogdanov

Hello,

I'm wondering if someone could tell me about custom error handling. I mean
that there are errors on the form where I try to leave the blank page like
required field. It shows to the user error message 'The field
"Deliveries.Date" cannot contain a Null value because the Required property
for this field is set to True...".

Is it possible to handle this error and replace it with my own Custom dialog
with my own "User-friendly message"? And is possible to somewhere
get description to field for which error occured?

Thnx in advance,
Sergey
 
Hi, the OnError event of the form can be used for this

Private Sub Form_Error(DataErr As Integer, Response As Integer)
MsgBox "Error saving record..."
Response = acDataErrContinue ' Don't display error
End Sub

Hope this helps, Graeme
 
I would check conditions for known errors (e.g. required field is blank) and
display a message, and have a generic error message for unknown errors.

Graeme.
 
Is there any way to handle data errors? For instance. If you have a
number of required fields within the database and you want to display a
custom error message but don't want to have to create if/then statements
to check all the required form elements can access pass you the data
error? For instance, in an ADP project of mine I have places where
access will pass back a "name field can not be null". I would like to
be able to get that information into my custom error handler and not
just the err.number=513 or whatever the number is.

-----Original Message-----
From: Graeme Richardson [mailto:graeme@adeptx_nospam.co.nz]
Posted At: Tuesday, July 29, 2003 3:46 PM
Posted To: formscoding
Conversation: Custom error
Subject: Re: Custom error

I would check conditions for known errors (e.g. required field is blank)
and
display a message, and have a generic error message for unknown errors.

Graeme.
 
Back
Top