querying a record after a specific record

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Let's just say that I have a very simple database set up
that tracks sales of lemonade from my stand. I have a
field with quantity of lemonade purchased measured by the
number of cups. I want to know how many cups were
purchased immediately following purchases of 10 cups or
more. (Each purchase is a new record)

I understand I can make a select query with the criteria
field greater than or equal to 10 cups but I do not
understand how to make the query return the results of
the next record?

EX.

Purchase1 = 5 cups
purchase2 = 8 cups
purchase3 = 12 cups
purchase4 = 3 cups
purchase5 = 2 cups


The result should be: 3 cups

Thanks for the help
Dave
 
Records are like ice cubes in a pitcher of lemonade. They have no order. If
you have the Date/Time a glass is sold or have your glasses/sales numbered
with an autonumber, then you could use a couple queries to pull the
information. Do you have a field that you can use to establish the order?
 
The question is how you define and tell JET of what you meant by "next"
since Records are store like things in a bucket with no inherent order.

If you want next in the chronological order, you will need a DateTime Field
in your Table.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top