View Full Version : Delete Queries


Knoxville
05-02-2002, 09:39 AM
I an using a delete query to delete items borrowed by customers in a sub form. However the query I have made deletes all the borrowed items belonging to that customer in the sub form. I want to be able to delete the borrowed items individualy as they will be returned at different times.
How is this done?

llkhoutx
05-03-2002, 07:41 PM
Build a query criteria for the record you want to delete by identifying the unique field in that record.

Knoxville
05-04-2002, 04:58 AM
The unique field would be the BorrowerID, what do I put in the query criteria?

DBL
05-04-2002, 07:05 AM
Why not go for a different approach. You could add a "deleted" field to the borrowing table and check it when the item is "deleted" and then hide deleted products by adding the deleted field to any relevant queries and putting "no" in the criteria for that field. That way you never actually delete the record and you can go back and uncheck a box if you need to. Trouble with deleting data in Access is onces it's gone, it's gone and if you can spare the space, this is a good alternative.

I think llkhoutx meant that each item borrowed should have it's own unique borrowed ID number and that's the one you need to identify.

Knoxville
05-04-2002, 12:19 PM
Problem solved, thanks!

Jerry Stoner
05-04-2002, 05:30 PM
Executing two queries at the same time is really a continuation of this post - right?