View Full Version : Delete a record on a single Form


L'apprentis
02-08-2006, 03:13 AM
Hi Everybody,
I am trying to delete a record on a Single Form, then Close that Form and then requery an other form that should be already open.
The Code I wrote doesn't seem to work, the code is interrupted before the command Close? What would be the correct way to write the code?

Private Sub CmdDelete_Click()
On Error GoTo Err_CmdDelete_Click

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

DoCmd.Close
Forms!FrmEnquiry.Requery

Exit_CmdDelete_Click:
Exit Sub

Err_CmdDelete_Click:
MsgBox Err.Description
Resume Exit_CmdDelete_Click

End Sub