Trapping DB error source (1 Viewer)

murali

New member
Local time
Today, 02:40
Joined
Jun 29, 2002
Messages
5
Hi There,
I am facing a small difficulty when i am dealing with access database from an access form.
I have 'Field' in a table whose required pr. is true.
A table is linked to the form as source
when i enter nothing in that required field field and try to save, it is throwing an error No.3314 from the database when captured in form_error event.

Private Sub Form_Error(DataErr As Integer, Response As Integer)

If DataErr = 3314 Then
Response = 0 'i dont want the message displayed by DB
MsgBox "Please Enter a valid value in '?' " 'custom message

End Sub

Here I can display custom message by supreesing the message
thrown by database.
Problem is I cannot catch that source field in DB which causing error as I want to set focus to that field.
Please help me to find that source.
Thanks
-Murali
 
R

Rich

Guest
Please don't post the same question under multiple topics, you now have three posts with the same question
 

Users who are viewing this thread

Top Bottom