I have a query in Access 97 and think I may need to use the IIF function. The query is based on a "UserDetails" table and shows users names as well as two date fields, "JoinDate" and "LeaveDate", these are to record when a user joins and leaves a service/product. If the "LeaveDate" is null then we can assume they are still registered for that particular service. There is also an "AccountRef" text field. This is duplicated in the table and the query so there are multiple "AccountRefs", some with "LeaveDates" and some with null "LeaveDates". What I want to do is find out if there are any "AccountRefs" where ALL users have a "LeaveDate" e.g. no active users within that account. Is the IIF function what I need to find this out. Any advice would be appreciated.