Query for latest production data

A

alec_russell

I’m not as proficient in Access 2003 as I’d like and have run into a
problem that I cannot solve.

I currently have an Access query/report that returns production data
(for one of several products) during a specific time interval (after
entering the date range and product ID on a switchboard). I’ve been
asked to produce a query/report that returns the same production data
for the most recently produced (say) 200 units. These 200 units may
have been produced on several days or there might be a total of fewer
than 200 units produced, in which case I’d like to see production data
for all of the units produced.

I’ve discovered how to find the most recent production date, and from
that return production data for that last production date, do I have
to run a similar query over and over [after removing the most recent
production date(s)] until I reach or exceed my total of (say) 200
units? How?
 
B

Bob Barrows [MVP]

I’m not as proficient in Access 2003 as I’d like and have run into a
problem that I cannot solve.

I currently have an Access query/report that returns production data
(for one of several products) during a specific time interval (after
entering the date range and product ID on a switchboard). I’ve been
asked to produce a query/report that returns the same production data
for the most recently produced (say) 200 units. These 200 units may
have been produced on several days or there might be a total of fewer
than 200 units produced, in which case I’d like to see production data
for all of the units produced.

I’ve discovered how to find the most recent production date, and from
that return production data for that last production date, do I have
to run a similar query over and over [after removing the most recent
production date(s)] until I reach or exceed my total of (say) 200
units? How?

Without seeing your table structure it's hard to get specific or avoid
guessing. Isn't it just a matter of
select TOP 200 <stuff>
from <yourtable>
order by ProductionDate DESC
?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top