Delete Records

Brum

Registered User.
Local time
Today, 23:53
Joined
Aug 28, 2001
Messages
10
Man I´m useless. This should be my last question on here (for a while!). My form won´t delete records. I used the command button wizard for a "delete record button" but for some reason nothing happens when you click it. Am I missing something obvious?
 
Post the code generated by the wizard for the button.

RDH
 
Private Sub cmdDelRcd_Click()
On Error GoTo Err_cmdDelRcd_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_cmdDelRcd_Click:
Exit Sub

Err_cmdDelRcd_Click:
MsgBox Err.Description
Resume Exit_cmdDelRcd_Click

End Sub
 
Try this instead:

Private Sub cmdDelRcd_Click()
On Error GoTo Err_cmdDelRcd_Click

DoCmd.RunCommand acCmdDeleteRecord

Exit_cmdDelRcd_Click:
Exit Sub

Err_cmdDelRcd_Click:
MsgBox Err.Description
Resume Exit_cmdDelRcd_Click

End Sub

Also make sure that in the On Click property for the button there is the following in the property:

[Event Procedure]

HTH
RDH

[This message has been edited by R. Hicks (edited 08-31-2001).]
 
Thanks a lot R!

That completes my project! Woo-hoo!

Andi
 

Users who are viewing this thread

Back
Top Bottom