H
Helpless or Hapless, but Never Hopeless
Hello,
I'm completely lost at this stuff. I'm trying to base a query on a form,
where I will only see details for the most recent revision to a paper. I
achieved that, but I couldn't update the status of that revision. So now I'm
back at square one.
This is my query without any max functions. Field RevisionLevel is a number,
and I need the max revisionlevel for each PaperID, and be able to update
PaperStatus.
SELECT DISTINCT tblPaperRevision.PaperID, tblPaperRevision.RevisionLevel,
tblPaperRevision.PaperStatus, tblPaperRevision.DateDone,
tblPaperRevision.DateDue, tblPeople.FirstName, tblPapers.Discipline,
tblPeople.LastName, tblPapers.P1Author, tblPapers.PrimaryID,
tblPapers.SecondaryID, tblRevisions.RevisionDefinition, tblPapers.Subject,
tblPapers.PaperTitle
FROM (tblPeople RIGHT JOIN tblPapers ON tblPeople.PrimaryID =
tblPapers.PrimaryID) RIGHT JOIN (tblPaperRevision LEFT JOIN tblRevisions ON
tblPaperRevision.RevisionLevel = tblRevisions.RevisionLevel) ON
tblPapers.PaperID = tblPaperRevision.PaperID;
I'm completely lost at this stuff. I'm trying to base a query on a form,
where I will only see details for the most recent revision to a paper. I
achieved that, but I couldn't update the status of that revision. So now I'm
back at square one.
This is my query without any max functions. Field RevisionLevel is a number,
and I need the max revisionlevel for each PaperID, and be able to update
PaperStatus.
SELECT DISTINCT tblPaperRevision.PaperID, tblPaperRevision.RevisionLevel,
tblPaperRevision.PaperStatus, tblPaperRevision.DateDone,
tblPaperRevision.DateDue, tblPeople.FirstName, tblPapers.Discipline,
tblPeople.LastName, tblPapers.P1Author, tblPapers.PrimaryID,
tblPapers.SecondaryID, tblRevisions.RevisionDefinition, tblPapers.Subject,
tblPapers.PaperTitle
FROM (tblPeople RIGHT JOIN tblPapers ON tblPeople.PrimaryID =
tblPapers.PrimaryID) RIGHT JOIN (tblPaperRevision LEFT JOIN tblRevisions ON
tblPaperRevision.RevisionLevel = tblRevisions.RevisionLevel) ON
tblPapers.PaperID = tblPaperRevision.PaperID;