Next function in Access

G

Guest

I am not able to figure out this query: I have a table with 3 fields (Knum,
Request Date, Response Date) and I need a query that will do the following:
for each Knum
if Request Dt <Response Dt and next(RequestDt)<Response Dt
display min (ResponseDt)
else display "No Response"
Basically, it will look like this:
Knum RequestDt ResponseDt
123 04/05/05 "No Response"
123 05/06/05 05/07/05
I know there is no next() function in Access, but if you have any ideas on
how to do this I would really appreciate it.

Thank you
 
J

JohnFol

It's not clear which values are variables and which are fields, but have a
look at DCount

ie DMin("*", "QueryBasedOnTableAndOrderedByRequestDT", "KNum=" & KNum &
"[REquestDt]> " & RequestDT)
 

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