I am attempting to execute a query which will be used as the basis for a report which extracts records from a table where the date in the table is less than or equal to a supplied parameter form date.
I want to use the parameter date in the header of the report so need to pass it in the query result (yes every record in the query result will contain the same value).
The query I have created works beautifully in generating the correct set of records but the value of the parameter in each record is blank (or null?)
The SQL is as follows . . .
SELECT tblDocument.Number, tblDocument.Title, tblDocument.StatusID, tblPerson.FirstName & " " & tblPerson.LastName AS AuthorName, tblActivity.Version, tblActivity.Description, tblActivity.Date, [Forms]![frmParm1a]![ReviewDueDate] AS ReviewDueDate, tblDocument.DateNextReview
FROM tblStatus INNER JOIN (tblPerson INNER JOIN (tblDocument INNER JOIN tblActivity ON tblDocument.SysGenID = tblActivity.DocumentID) ON tblPerson.SysGenID = tblDocument.AuthorID) ON tblStatus.SysGenID = tblDocument.StatusID
WHERE (((tblDocument.DateNextReview)<=[Forms]![frmParm1a]![ReviewDueDate]) AND ((tblStatus.Name)="Existing")) OR (((tblStatus.Name)="Proposed")) OR (((tblDocument.DateNextReview)<=[Forms]![frmParm1a]![ReviewDueDate]) AND ((tblStatus.Name)="Draft"))
ORDER BY tblDocument.Number, tblDocument.Title, tblActivity.Version;
Why is ‘ReviewDueDate’ blank?
Thanks in advance
Dave