I am trying to build an expression in an Access report that looks at a Main Query (record source of all learners) and asks it specific questions. I am basically trying to write an IIf statement similar to below with an OR clause. I know it is wrong because the OR clause messes it up when I build the expression, but what I am trying to ask Access is
[code]=Sum(IIf([TR_Start]<#01/08/2011# And [TR_End] Is Null OR [TR_End] >#31/07/2011# And [progtype] Like "99" And [agecode] like "1",1,0))[\CODE]
Expand|Select|Wrap|Line Numbers
- [TR_Start]
Expand|Select|Wrap|Line Numbers
- [TR_End]
Expand|Select|Wrap|Line Numbers
- [agecode]
Expand|Select|Wrap|Line Numbers
- [progtype]
I basically want to take a snapshot view of specific learners at the 1st day of each month. So I want learners with agecode of 1 who are on a progtype of 99 who also have a null end date OR a greater end date than the last day of the preceding month AND a training start date less than the first day of the month in question. I can achieve this
Expand|Select|Wrap|Line Numbers
- is Null or <
Can anyone please offer any straightforward solution?
Any help greatly appreciated. :-)