R
Ron Weaver
I have used the automated command button to delete records on my "orders"
form. This form has a sub form "OrderDetails"
The code looks like this:
Private Sub Command113_Click()
On Error GoTo Err_Command113_Click
DoCmd.RunCommand acCmdSaveRecord
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command113_Click:
Exit Sub
Err_Command113_Click:
MsgBox Err.Description
Resume Exit_Command113_Click
End Sub
My problem: The delete button deletes the record on my form, but sometimes
leaves it in the "Orders" and "OrderDetails" tables. When I do a customer
orders search, those deleted orders show up. When I click on them to display
the order, they come up blank. I would like them not to show up at all. I
added the "save Record" in the above code, thinking it might help.
form. This form has a sub form "OrderDetails"
The code looks like this:
Private Sub Command113_Click()
On Error GoTo Err_Command113_Click
DoCmd.RunCommand acCmdSaveRecord
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command113_Click:
Exit Sub
Err_Command113_Click:
MsgBox Err.Description
Resume Exit_Command113_Click
End Sub
My problem: The delete button deletes the record on my form, but sometimes
leaves it in the "Orders" and "OrderDetails" tables. When I do a customer
orders search, those deleted orders show up. When I click on them to display
the order, they come up blank. I would like them not to show up at all. I
added the "save Record" in the above code, thinking it might help.