Reputation: 171
My DB allows users to add New Material Numbers (only one column). These numbers are stored/appended to a table. I use a Subform to display them back to the user for visibility.
Sometimes user may input an incorrect Material Number. Current process is manually removing from the table. I need to provide an automated option to remove this record from the table.
Steps:
1. User must SELECT a record from the Subform.
2. Press button to remove, which will remove the selected record from the table
My challenge is capturing the selected item from the table.
table = tblMaterial
subform = subfrmMaterial
Any support is appreciated.
Upvotes: 0
Views: 35
Reputation: 21379
Options:
user can use keyboard Delete
code runs DoCmd.RunCommand acCmdDeleteRecord
code runs SQL action DELETE FROM tblMaterial WHERE ID=" & Me.MaterialID
Upvotes: 1