Delete Query -- QUESTION

K

kealaz

I want to delete from tblBUY those parts that I just cut a purchase order for.

tblBUY does not have P_O_NO because it is before the purchase order is cut.

I want to build a query that filters tblBUYHIST and then take ALL of the
part numbers [PART_NO] on the resulting records and delete all records with
matching part numbers [PART_NO] on tblBUY.

I only want to delete records from tblBUY, not tblBUYHIST.

*************************************************

Here's what I'm trying.


I have created a SELECT Query [qryDeleteBUY_a]

Field: P_O_NO
Table: tblBUYHIST
Criteria: [Enter PO No:] I'm want to change this so that it gets the info
from strCriteria from my form [frmPO_ISSUE].

Field: PART_NO
Table: tblBUYHIST


This isolates the P.O. I enter and is working how I want it to work.



I'm also want to create a DELETE Query [qryDeleteBUY_b]

I think this will work

DELETE tblBUY.PART_NO
FROM tblBUY
WHERE PART_NO IN (SELECT PART_NO FROM qryDeleteBUY_a)


How do I translate that into the required fields in the design view of the
DELETE query?

Field:
Table:
Delete:
Criteria:


*************************************************


Thank you for any help you can provide!!!
 
F

Fred

I noticed that nobody answered.

You really need to explain WHAT you are trying to do (defined in terms of
tables, data, records) , not HOW you are trying to do it. Under this
framework, other than one vague sentence, your whole post is about "how"
rather than "what"

The important part of this is a good table structure that supports what you
are trying to do. If you already have that, you'll need to describe "what"
in terms of that table structure and records. If not, you should repost
asking for help on table structure.

Hope that helps a little.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top