error trap

B

Bill H.

I have a command like this:

DoCmd.RunCommand acCmdDeleteRecord

in my code. At the top of the fragment I have on error goto Err_Click

then under Err_Click, I have:

Select Case Err.Number
Case 3200
Beep
Case 2046 'tried to delete on new record
Resume
Exit Sub
End Select

When I try to delete a record that is related into another record, I get a
runtime error code 3200 if I have startup option of use access special keys
checked. When I uncheck that box (save and reopen) and try the same delete,
I never seem to get to the case stmt.

What did I leave out?
 

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

Top