Error Handling - BASIC

  • Thread starter szag via AccessMonster.com
  • 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
 
S

szag via AccessMonster.com

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top