Access 2010 here.
There are two tables in a 1-to-1 relationship (MainDB, Parts) and a command from the form (MainForm) that operates on the "Parts" table:
CurrentDb.Execute "DELETE * FROM Parts WHERE ID = ID", dbFailOnError
PartsForm.Requery
This would simply delete the entire "Parts" table and requery the subform working with that table (PartsForm). I'm just looking to delete a single record based on the ID of the currently selected record in "MainForm" from where the command is called. If there is a record with the same ID in the "Parts" table as the current record selected in "MainForm", this command should get rid of it on call.
Of course,
WHERE ID = ID
Is going to be the problem, but the command did not like references to fields available in "MainDB." How do you refer to the active record's ID through this command?
Thanks for the help. This seems like it should be a simple syntax fix.