W
Wylie C
I have a form in Access 2000 with a delete record button and an exit button.
They work fine but because I have setfocus statements on some fields 'On
Exit' procedures, the record will not delete or the form will not close unitl
all the setfocus statements have been executed. Below is the code for the
delete record button.
Private Sub DeleteRecord_Click()
On Error GoTo Err_DeleteRecord_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_DeleteRecord_Click:
Exit Sub
Err_DeleteRecord_Click:
MsgBox Err.Description
Resume Exit_DeleteRecord_Click
End Sub
The Close form coding is:
DoCmd.Close
DoCmd.OpenForm "Switchboard"
How would I modify it so when it is clicked it would bypass all the other
forms coding and delete the current record?
Thank you.
They work fine but because I have setfocus statements on some fields 'On
Exit' procedures, the record will not delete or the form will not close unitl
all the setfocus statements have been executed. Below is the code for the
delete record button.
Private Sub DeleteRecord_Click()
On Error GoTo Err_DeleteRecord_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_DeleteRecord_Click:
Exit Sub
Err_DeleteRecord_Click:
MsgBox Err.Description
Resume Exit_DeleteRecord_Click
End Sub
The Close form coding is:
DoCmd.Close
DoCmd.OpenForm "Switchboard"
How would I modify it so when it is clicked it would bypass all the other
forms coding and delete the current record?
Thank you.