Edit: Use what Dal provided 
--------
You need both tables in the FROM clause.
I'm not the best at this. It usually takes me a couple of tries to get the query to do what I want, not what I tell it to do.
Try this:
Create a new query in design view.
Add both tables. The ahould be linked by the fields
[tExcluded Customers].[SOLD TO#] and [tSAP Temp Table].[Branch account]
In the first column of the grid, add the "*" from table [tSAP Temp Table]
In the 2nd column of the grid, add the field [Branch account].
In SQL view, your query should look like:
Code:
SELECT [tSAP Temp Table].*, [tSAP Temp Table].[Branch account]
FROM [tExcluded Customers] INNER JOIN [tSAP Temp Table] ON [tExcluded Customers].[SOLD TO#] = [tSAP Temp Table].[Branch account];
Change back to Design view.
Now add a criteria to the 2nd column:[tExcluded Customers].[SOLD TO#]
In SQL view, you should have:
Code:
SELECT [tSAP Temp Table].*, [tSAP Temp Table].[Branch account]
FROM [tExcluded Customers] INNER JOIN [tSAP Temp Table] ON [tExcluded Customers].[SOLD TO#] = [tSAP Temp Table].[Branch account]
Where [tExcluded Customers].[SOLD TO#] = [tSAP Temp Table].[Branch account];
Change back to Design view. Change the query to a DELETE query.
In the 3rd row (Delete) of the first column, you should see "FROM"
In the 3rd row (Delete) of the second column, you should see "WHERE"
In SQL view, you should have:
Code:
DELETE *
FROM [tSAP Temp Table] INNER JOIN [tSAP Temp Table] ON [tExcluded Customers].[SOLD TO#] = [tSAP Temp Table].[Branch account]
Where [tExcluded Customers].[SOLD TO#] = [tSAP Temp Table].[Branch account];
Again the warning..... Try this on a COPY of the dB. I still struggle with creating delete queries using joined tables.
I don't create them very often.
This query will (should) delete the entire row of data, not just the data from one field.