I have created a button where I run a group of Delete Queries on MS Access 2016 , to delete records from forms and subforms, to clean a main Form.
They have the following kind of SQL statement, to delete the records from the tables that feed my forms:
DELETE tblConfig.TenderID, *
You are on a specific record within the form (
[frmGI].[tenderID]), which you then delete, so you will see the
#deleted. If you delete a record, you will have to move to a new record or a different record.
If you are deleting subform records then you will need to
requery your subform.
To requery your subform use the following code syntax and insert after the queries have been taken place. The
#deleted on a subform is due to a
refresh taking place on the subform. Refresh and requery are not the same.