Delete a record on a single Form

L'apprentis

Redcifer
Local time
Today, 08:28
Joined
Jun 22, 2005
Messages
177
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?

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
 

Users who are viewing this thread

Back
Top Bottom