Subform/Subquery

  • Thread starter ironwood9 via AccessMonster.com
  • Start date
I

ironwood9 via AccessMonster.com

I have a form that is tied to my projects table - there is a subquery on the
form that is based on a 'top 5' query of the five most recent projects. When
the form opens, the record displayed is the most recent project, so there is
some redundancy, as it shows the detail for the active record which when the
form opens is the most recent project created, but that is also the first
project shown on the list of the 5 latest projects created. Is there a way I
can just show not the latest project created, but the one before that, and so
on - 5 projects total in my subform/subquery ?

Here is the SQL for my subquery, based on tblProjects:

SELECT qryProjectsLastFive.ProjectID, qryProjectsLastFive.Description FROM
qryProjectsLastFive

I also tried this, and it didn't work:
SELECT TOP 6 ProjectID, Description, FROM tblProjects P WHERE (P.ProjectID
NOT IN (SELECT TOP 1 ProjectID FROM tblProjects_1))
 

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