I have created a 'Super User' form that allows supervisors to add/remove/edit data. The form has a Tab subform associated with it.
On tab 1 (Company), there are 2 list boxes - one for companies and one for the companies' staff. What I would like to do is create a DELETE function that allows a user to select a company and delete the company and its underlying staff records.
Since the company and staff data are stored on two tables, I cannot figure out how to do this. Currently, I am considering running two SQL DELETE statements - one to (first) delete the associated staff records and the other to (then) delete the company record.
Is that the best way or is there a way to create one SQL DELETE statement that will do this?
Thank you, in advance.
On tab 1 (Company), there are 2 list boxes - one for companies and one for the companies' staff. What I would like to do is create a DELETE function that allows a user to select a company and delete the company and its underlying staff records.
Since the company and staff data are stored on two tables, I cannot figure out how to do this. Currently, I am considering running two SQL DELETE statements - one to (first) delete the associated staff records and the other to (then) delete the company record.
Is that the best way or is there a way to create one SQL DELETE statement that will do this?
Thank you, in advance.