Delete a current record from a form and related tables.

R

Ron Weaver

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.
 
J

Jeff C

Open the properties of your delete button and go to the code window. Try
adding

Me.Refresh

as the first line of the code
 
R

Ron Weaver

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top