orangeseatbelt
Technical User
not even sure if this is a subquery but I can't even come close to finding another way of solving it.
Table of orders
=====================================
order cust order order
num code date cost
=====================================
456 cust1 1/3/2011 99
234 cust1 4/4/2010 55
780 cust1 2/2/2010 12
239 cust2 1/3/2011 77
894 cust3 1/3/2011 88
558 cust3 6/6/2010 50
What I'm trying to do is to pull orders from a particular data range (assume 1/3/2011) for now and then retrieve the order_cost for the MOST RECENT order.
So for the above table it should show
456 cust1 1/3/2011 99 55
239 cust2 1/3/2011 77 0
894 cust3 1/3/2011 88 50
Can I even do this through a sub-query? I was hoping to use the subquery as an expression - but I can't seem to get Access to accept the date from the first query in the subquery. Obviously I don't want to put in 1/3/2011 in the subquery because the date will change.
thanks
Table of orders
=====================================
order cust order order
num code date cost
=====================================
456 cust1 1/3/2011 99
234 cust1 4/4/2010 55
780 cust1 2/2/2010 12
239 cust2 1/3/2011 77
894 cust3 1/3/2011 88
558 cust3 6/6/2010 50
What I'm trying to do is to pull orders from a particular data range (assume 1/3/2011) for now and then retrieve the order_cost for the MOST RECENT order.
So for the above table it should show
456 cust1 1/3/2011 99 55
239 cust2 1/3/2011 77 0
894 cust3 1/3/2011 88 50
Can I even do this through a sub-query? I was hoping to use the subquery as an expression - but I can't seem to get Access to accept the date from the first query in the subquery. Obviously I don't want to put in 1/3/2011 in the subquery because the date will change.
thanks