DLookUp Function

T

trs9385

I have a table that looks like this right now
Column A
1) 9/21/06
2) 9/22/06
3) 9/23/06
4) 9/27/06
5) 9/28/06
6) 10/2/06
7) 10/3/06

I want the previous date in Column B. So this is what I want it to look
like in B

Column B
1) <nothing>
2) 9/21/06
3) 9/22/06
4) 9/23/06
5) 9/27/06
6) 9/28/06
7) 10/2/06

I'm trying to use the DLookUp Function to do this in a query.
This is only a tidbit of what I have, there are hundreds of other dates.
Can someone help me?
 
D

Douglas J. Steele

SELECT ColumnA, DMax("ColumnA", "MyTable", "ColumnA < " & Format([ColumnA],
"\#yyyy\-mm\-dd\#"))
FROM MyTable

It will likely be slow...
 

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