MAX DATE ON MULTIPLE FIELDS

I have this table called tbl_PO_OPEN and I have 4 date fields that I'm tryint to query against.

I attached both the db and the excel file for the rationale of what the query should be, highligthed in yellow.  

What the goal is to create a query that takes the 4 dates that is less than 10/1/18/18 and the amount associated to each supplier that is less than 10/1/18 for each supplier.
C--Users-lfreund-Desktop-COST-EE.accdb
C--Users-lfreund-Documents-COST-EE.xlsx
LUIS FREUNDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
Using this query, I get 21 rows, not 15.  What am I missing?
SELECT tbl_PO_OPEN.SUPP_NAME, tbl_PO_OPEN.ITEM, tbl_PO_OPEN.PLND_DEL_DATE, tbl_PO_OPEN.CONF_DEL_DATE, 
tbl_PO_OPEN.CHNG_DEL_DATE, tbl_PO_OPEN.CUR_PLND_DATE, tbl_PO_OPEN.PO_LINE_AMT
FROM tbl_PO_OPEN
WHERE (((tbl_PO_OPEN.PLND_DEL_DATE) Is Null Or (tbl_PO_OPEN.PLND_DEL_DATE)<#10/1/2018#) 
AND ((tbl_PO_OPEN.CONF_DEL_DATE) Is Null Or (tbl_PO_OPEN.CONF_DEL_DATE)<#10/1/2018#) 
AND ((tbl_PO_OPEN.CHNG_DEL_DATE) Is Null Or (tbl_PO_OPEN.CHNG_DEL_DATE)<#10/1/2018#) 
AND ((tbl_PO_OPEN.CUR_PLND_DATE) Is Null Or (tbl_PO_OPEN.CUR_PLND_DATE)<#10/1/2018#))
ORDER BY tbl_PO_OPEN.SUPP_NAME, tbl_PO_OPEN.ITEM DESC , tbl_PO_OPEN.PLND_DEL_DATE;

Open in new window

Query result for "A &" supplier:
SUPP_NAME	ITEM	PLND_DEL_DATE	CONF_DEL_DATE	CHNG_DEL_DATE	CUR_PLND_DATE	PO_LINE_AMT
A & 	7845	8/31/2018			8/31/2018	$825.00
A & 	7845	8/31/2018			8/31/2018	$275.00
A & 	7845	8/31/2018			8/31/2018	$825.00
A & 	7845	8/31/2018			8/31/2018	$825.00
A & 	7845	8/31/2018			8/31/2018	$998.30
A & 	7845	8/31/2018		9/29/2018	8/31/2018	$998.30
A & 	7845	8/31/2018			8/31/2018	$998.30
A & 	7808			9/8/2018	8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7808	8/10/2018	9/1/2018	9/3/2018	8/20/2018	$73.68
A & 	7808	8/10/2018			8/10/2018	$73.68
A & 	7807	8/22/2018			8/22/2018	$58.40

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aranaCommented:
why  if 2 records match all dates < 10/1/2018 , one is selected and one is not?
A70N5ZL-1-.png
0
LUIS FREUNDAuthor Commented:
I would have to account for each row so I can add up the total cost for each supplier as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.