I am having a problem with DELETING files from the tables. I have the code:
Private Sub frm_cmd_Delete_Click()
On Error GoTo Err_frm_cmd_Delete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_frm_cmd_Delete_Click:
Exit Sub
Err_frm_cmd_Delete_Click:
MsgBox Err.Description
Resume Exit_frm_cmd_Delete_Click
Is there more code I can place in there so the records get deleted from the
table as well as the query??
Newf

Signature
Newf
~Everyone needs a NEWFIE as a friend~
Jerry Whittle - 22 Aug 2006 15:35 GMT
Tables don't have files; however they do have fields. Are you trying to
delete fields from the table or records?
Either which way, the old DoMenuItem was always a little buggy and should be
replaced with DoCmd.RunCommand. Something like below should work if you want
to delete the record that you are currently in on the form.
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.RunCommand acCmdSave
Actually the last line shouldn't be needed. If that doesn't delete the
record, something else is going on.

Signature
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> I am having a problem with DELETING files from the tables. I have the code:
> Private Sub frm_cmd_Delete_Click()
[quoted text clipped - 14 lines]
>
> Newf