I am attempting to write a delete query so that once you select an item in a combo box and then hit the delete button, it looks for the Item you have selected then deletes it from a table. This is what I have at the moment but when I run it a popup appears, treating the DeleteUserCombo part as a parameter. Also, I have managed to setup my form with several text boxes so that I can add a new person in by putting their name etc in. I was wondering if it was possible to make it so that once I add someone to the table, it automatically refreshes the combo box so that said person appears in the combo box as well. As it is I have been having to close the form then reopen it in order to refresh the combo box. Any help would be appreciated. Thank You.
DELETE *
FROM [Customer Details Table]
WHERE [Customer Details Table].CustomerID=DeleteUserCombo;
DELETE *
FROM [Customer Details Table]
WHERE [Customer Details Table].CustomerID=DeleteUserCombo;