runningphan
MIS
I've been having some problems with a delete query where I need to delete records from multiple tables based on a User defined value. I can setup 2 delete queries and it works great but I'd like for the user to provide one value and it is deleted out of both databases.
I have two tables (Transactions and Jobs). Both tables have the common field Job_Id. I want the user to provide a Job_Id and all records in both Transactions and Jobs are then deleted that contain Job_Id.
Here is my SQL statement that I have that does not work. I am currently getting the error "Could not delete from specified tables".
DELETE JOBS.*, TRANSACTIONS.*, JOBS.Job_Id
FROM JOBS INNER JOIN TRANSACTIONS ON JOBS.Job_Id = TRANSACTIONS.Job_Id
WHERE (((JOBS.Job_Id)=[Enter Job #]));
Any Ideas? Thanks!
I have two tables (Transactions and Jobs). Both tables have the common field Job_Id. I want the user to provide a Job_Id and all records in both Transactions and Jobs are then deleted that contain Job_Id.
Here is my SQL statement that I have that does not work. I am currently getting the error "Could not delete from specified tables".
DELETE JOBS.*, TRANSACTIONS.*, JOBS.Job_Id
FROM JOBS INNER JOIN TRANSACTIONS ON JOBS.Job_Id = TRANSACTIONS.Job_Id
WHERE (((JOBS.Job_Id)=[Enter Job #]));
Any Ideas? Thanks!