R
Robin
Hello,
I have the following scenerio:
An Engagement is made up of 5 Assignments to be completed sequentially by
different staff members. When the Engagement is first set up, I want the
first Assignment in the sequence to show up in a "New Assignments" listbox
which is based on listbox "lstSMainS". When the staff "checks" the
Assignment complete (CAComplete) it shows up when the next staff's ID is
chosen in the lstSMainS.
I have the following SQL which I thought would give me the the record where
the sequence number (CASequence) was the "next in sequence" after the
completed Assignments when CAStaffID matched lstSMainS. Instead it is giving
me each staff's assignment whether the assignment preceding it has been
complete or not.
SELECT ClientAssignment.ClientID, ClientAssignment.EngagementID,
ClientAssignment.EngagementYr, ClientAssignment.AssignmentID,
ClientAssignment.CADescriptionI, ClientAssignment.CADueDate
FROM ClientAssignment
WHERE
(((ClientAssignment.CASequence)=DMin("[CASequence]","ClientAssignment","CAComplete
= False AND ClientID = """ & [ClientID] & """ AND EngagementID = """ &
[EngagementID] & """ AND EngagementYr = """ & [EngagementYr] & """ AND
AssignmentID = """ & [AssignmentID] & """")) AND
((ClientAssignment.CAStaffID)=[Forms]![zfmMain]![lstSMainS]))
ORDER BY ClientAssignment.CADueDate;
Any thoughts would be appreciated,
Robin
I have the following scenerio:
An Engagement is made up of 5 Assignments to be completed sequentially by
different staff members. When the Engagement is first set up, I want the
first Assignment in the sequence to show up in a "New Assignments" listbox
which is based on listbox "lstSMainS". When the staff "checks" the
Assignment complete (CAComplete) it shows up when the next staff's ID is
chosen in the lstSMainS.
I have the following SQL which I thought would give me the the record where
the sequence number (CASequence) was the "next in sequence" after the
completed Assignments when CAStaffID matched lstSMainS. Instead it is giving
me each staff's assignment whether the assignment preceding it has been
complete or not.
SELECT ClientAssignment.ClientID, ClientAssignment.EngagementID,
ClientAssignment.EngagementYr, ClientAssignment.AssignmentID,
ClientAssignment.CADescriptionI, ClientAssignment.CADueDate
FROM ClientAssignment
WHERE
(((ClientAssignment.CASequence)=DMin("[CASequence]","ClientAssignment","CAComplete
= False AND ClientID = """ & [ClientID] & """ AND EngagementID = """ &
[EngagementID] & """ AND EngagementYr = """ & [EngagementYr] & """ AND
AssignmentID = """ & [AssignmentID] & """")) AND
((ClientAssignment.CAStaffID)=[Forms]![zfmMain]![lstSMainS]))
ORDER BY ClientAssignment.CADueDate;
Any thoughts would be appreciated,
Robin