Deleting Item from a table after it has been used in a form

gigifarrow
gigifarrow used Ask the Experts™
on
I have a form that has a field based on a drop down from another table. Once that Item is used on the form I need it to delete from that table.


What do I need to do to have Just that  item deleted that was picked on that form to delete from the drop down table it came from?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
you can run a delete query


now depending on how you set the row source of your combo box
if you set the rowsource with a single field and a text data type use this
currentdb.execute "delete * from tableName where [fieldName]='" & me.comboboxName & "'"

 text number data type use this
currentdb.execute "delete * from tableName where [fieldName]=" & me.comboboxName


post the rowsource of the combo box so we can edit the delete query accordingly

* another to consider is to when you will execute the delete query, this will depend on the operation you are doing

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial