G
Guest
I have a form with a button to delete a record from a table. The delete
button works however the form doesn't advance to the next record or go back
to the previous record. The record no longer exists in the table but it is
still being shown in the form. I've tried adding commands to go to the next
record, but it never appears to get to that command. How do I get rid of the
deleted record and show the next record.
Private Sub Delete_Command_Click()
On Error GoTo Err_Delete_Command_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
' does not get to the following command
DoCmd.GoToRecord , , acNext
Exit Sub
Err_Delete_Command_Click:
If (Err.Number <> ACTION_CANCELLED) Then MsgBox Err.Description
Me!Name_Text.SetFocus
End Sub
Your help will truly be appreciated,
kitters
--
button works however the form doesn't advance to the next record or go back
to the previous record. The record no longer exists in the table but it is
still being shown in the form. I've tried adding commands to go to the next
record, but it never appears to get to that command. How do I get rid of the
deleted record and show the next record.
Private Sub Delete_Command_Click()
On Error GoTo Err_Delete_Command_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
' does not get to the following command
DoCmd.GoToRecord , , acNext
Exit Sub
Err_Delete_Command_Click:
If (Err.Number <> ACTION_CANCELLED) Then MsgBox Err.Description
Me!Name_Text.SetFocus
End Sub
Your help will truly be appreciated,
kitters
--