Delete field data not record with delete query

skwilliams

Registered User.
Local time
Today, 15:56
Joined
Jan 18, 2002
Messages
516
I have a table "tblMain" with multiple fields including one called "Samples". I would like to use a query to delete to remove data from the Samples field if it matches data from a reference table called "tblItems".

Any ideas??

Thanks.
 
an Update query that updates the Sample field to null, based on the match with the other table
 
That makes sense.

This is the criteria I'm using but not working.

UPDATE tblMain SET tblMain.Sample = Null
WHERE (((tblMain.Sample)=DLookUp("ItemOfferID","tblItems")));
 
Depends on what Sample field is set as - Numeric or Text. If good design should be numeric and storing the ID number of Items. If not, and you are storing Text, then you need to link Items to ItemsOffer and set to ""
 

Users who are viewing this thread

Back
Top Bottom