I use Access to create the Query to delete records here is what I get:
DELETE tblOutbounds.SchAptDate, tblOutbounds.OutboundNum, tblOutbounds.*
FROM tblOutbounds LEFT JOIN Trailers ON tblOutbounds.OutboundNum = Trailers.OutboundNum
WHERE (((tblOutbounds.SchAptDate)<Date()-5) AND ((tblOutbounds.OutboundNum) Not In ([Trailers].[OutboundNum])));
The above query gives me the records I should be deleting, but When I try to run it, it does not delete records.
So I created this SQL. But when I run this I get zero records selected.
SELECT count(*) FROM tblOutbounds WHERE tblOutbounds.SchAptDate < (Date()-5) and tblOutbounds.OutboundNum Not In (select distinct Trailers.OutboundNum from Trailers)
You see in the above SQL what I am intending to do. This SQL will be run from a Web page. Any help would be apprecited.