Delete a current record from a form and related tables.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Second Posting:

Occasionally while entering an order on my Orders form/OrderDetails subform
I need to delete the record. I have a delete button which is supposed to
first, save the record, then delete it. My problem: The record disappears
from the form, but it is still in the tables. To delete the record from the
tables, I first have to close the Orders form, go to my search form, and
reopen this record in the Orders form. The delete button then deletes the
record from both tables.
Thanks for any help on this.
 
Open the properties of your delete button and go to the code window. Try
adding

Me.Refresh

as the first line of the code
 
Hi Jeff, thanks for you reply
That didn't work. My code looks like this:
On Error GoTo Err_Command113_Click
Me.Refresh
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Command113_Click:
The above code is the built in "delete record" for command buttons.
Thanks
 
Back
Top