Code:
SELECT IIf([Program] Like '*General', 1, 0) AS Ordering, Program, Task, ID, OGID, StartDate, OGStartDate, Author, OGAuthor, Initials, BodyText, OldStatus, Ongoing, Urgent, nEdits
FROM [tblStatus]
WHERE OGAuthor IN
(
SELECT FullName
FROM tblUsers
WHERE tblUsers.Group = 'Embedded Systems (Commercial & Navy Programs)'
)
AND
(
(StartDate BETWEEN #8/22/2017# AND #8/23/2017#) OR (Ongoing = True)
)
AND OGAuthor IN
(
SELECT FullName
FROM tblUsers
WHERE tblUsers.Department = 'SW'
)
AND Urgent = True
AND isCurrent = True
ORDER BY Ordering, Program, SubProgram, Task, Initials DESC, StartDate DESC, OGStartDate DESC, ID ASC;
So I've gotten rid of the CASE WHEN clause and the SELECT *. I've changed the SELECT statement to define 'Ordering' based on the [Program] being like "*General". I'm getting an error upon CurrentDb.OpenRecordset. ErrorNumber = 3061, Too few parameters. Expected 1.
Not sure where the issue is..