My database is based on one table which includes the numeric field Action, and the date fields, DateIn and DateOut. Action is a 6-digit number that can be considered a work order and remains the same until the action is finalized. When an action comes into our office, we record the DateIn, and when it is complete, we record DateOut. Sometimes we need to return the action to the originator (sometimes more than once), in which case both DateIn and DateOut are recorded, before we can finalize it. We run several reports based on these dates.
Here's my problem: In some reports, I want a control to count only the most recent action (see red entry below) when DateOut is null. How do you create an expression in the report that ignores earlier 'DateOut' dates (is not null) and only applies the expression to the most recent action where DateOut is null? Is there a variation of the count function that would help me to count only the most recent action that has no DateOut? Thanks much for the help.
DateIn DateOut
1 May 07 4 May 07
5 May 07 6 May 07
7 May 07 Is Null
Here's my problem: In some reports, I want a control to count only the most recent action (see red entry below) when DateOut is null. How do you create an expression in the report that ignores earlier 'DateOut' dates (is not null) and only applies the expression to the most recent action where DateOut is null? Is there a variation of the count function that would help me to count only the most recent action that has no DateOut? Thanks much for the help.
DateIn DateOut
1 May 07 4 May 07
5 May 07 6 May 07
7 May 07 Is Null