'Last' Function

  • Thread starter Thread starter Neil
  • Start date Start date
N

Neil

I'm currently in the process of creating a Supply
Management database and am struggling with the 'Last'
function in the Totals list in the Query Design Grid.

I want it to bring back te last Stock value for the month,
but it is only working for some products, why is this?

Look forward to someones response

Neil
 
Neil

Check Access HELP on Last -- what Access means and what you mean by "last"
is probably not the same.

You haven't described your data structure, so the following is just a
guess...

If you have rows with Stock and DateChecked, you could get the
Max(DateChecked) per Stock item, given a selected month (i.e., where
Month(DateChecked) = ####).
 
Jeff

Thanks for your response.

The basic explanation of my database is that each week a
transactions file is imported into the database. The
transaction contains a week number(for the month), a month
number and a year.

Each week a Physical Stock value is sent on the file.

I want to be able to produce monthly figures and in order
to do this i need to be able to say the Physical Stock for
each product at the end of each month is the stock figure
imported last in that month. I.e. the one with the highest
week number.

Don't know if there is a way to do this or not.

I look forward to your response

Thanks

Neil
 
Neil

If you have a week# for a month, try using the Max() totals (aggregate)
query. This gets around differing interpretations of "Last".
 
Jeff

I think you may have helped me solve the problem. I have
created a query that brings back the last week of the
month so far and then linked that query to the
transactions, which then brings back the last physical
stock value.

I've just gotta check that this works correctly now!

Many Thanks for your help

Neil
 
Back
Top