L'apprentis
Redcifer
- Local time
- Yesterday, 18:11
- 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?
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