Error Handling - BASIC

  • Thread starter Thread starter szag via AccessMonster.com
  • Start date Start date
S

szag via AccessMonster.com

I am new to any kind of error handling in my form so I me be way off in what
I am trying to accomplish.
I have a main form and subform and when I try to delete a record that has
related records in the subform it gives me the standard "The record cannot be
deleted.....includes related records'. I looked up the error code which was
3200. I tried to write as basic of a function as I could to get the hang of
it by writing the following through the On Error property of my form
properties:

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

If DataErr = 3200 Then
MsgBox ("You can't delete this until the Cust RU records are also deleted")
End If

End Sub

I am obviously doing some what wrong since I keep getting the standard
message.

Zag
 
Same thing - nothing happens:

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

If DataErr = 3200 Then
MsgBox ("You can't delete this until the Cust RU records are also deleted")
Response = acDataErrContinue
End If

End Sub
Try adding

Response = acDataErrContinue

inside the If construct.
I am new to any kind of error handling in my form so I me be way off in
what
[quoted text clipped - 22 lines]
 
Back
Top