SELECT TOP 2 DueDate
FROM YourTable
WHERE DueDate >=Date()
ORDER BY DueDate
If you can only use the query grid
Field: DueDate
Sort: Ascending
Criteria: DueDate >= Date()
Then set the query's Top Values property to 2
If you table contains multiples of the same date then you will need to build
a distinct query first and then use that in place of the table. You might
be able to do that in a single query that looks like the following in SQL.
SELECT Top 2 DueDate
FROM
(SELECT DISTINCT DueDate
FROM YourTable
WHERE DueDate >= Date()) as UniqueDates
ORDER BY DueDate
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
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.