Thread: Delete button
View Single Post
  #4  
Old May 20th, 2010, 04:06 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Delete button

"Dee" wrote in message
...
Thank you for your reply. However, I did not have any code as you
mentioned
below that would turn the warnings off. I only used the standard delete
button that is created with the wizard. the odd thing is, it works in some
of
the forms, and the code is exactly the same as the ones that dont work.

Private Sub Delete_Record_Click()
On Error GoTo Err_Delete_Record_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Delete_Record_Click:
Exit Sub
Err_Delete_Record_Click:
MsgBox Err.Description
Resume Exit_Delete_Record_Click
End Sub


The wizards produce outdated code, but it should still work the same. If
you really don't have any code that turns warnings off, I don't know why you
would get warnings on some forms and not on others.

If you'd like to send me a copy of your database and a list of steps to
reproduce the problem, I'll have a look at it, time permitting. Please be
sure to compact and zip the database to minimize the size. You can send it
to the address derived by removing NO SPAM and ".invalid" from the reply
address of this message. If that address isn't visible to you, you can get
my address from my web site, which is listed in my sig. Do *not* post my
real address in the newsgroup -- I don't want to be buried in spam and
viruses.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)