Thank you very much. The latest crosstab query suggestion works fine. A question though, when I view the crosstab query in design view, the second Column heading is: Expr1: "DOE" & 5-c.DateRank 1) Why does the Expr1 display in the Design View, and 2) when I run the query, the first DOE1 is not displayed as a Column Heading? I showed the examples below indicating data entry mistakes: Sample 1 A and B is the same person, he had 3 exams, using the same SSN, however the Name was misspelled once thus creating an empty cell under DOE4 of Sample 1 A. Sample 2 does catch my duplicate entry as also Sample 3 gives me a duplicate. This is what I was looking for.
Name Total DateOfExams DOE2 DOE3 DOE4
Sample 1 A 2 18-Dec-02 13-Apr-04
Sample 1 B 1 13-Apr-04
Sample 2 2 23-Feb-04 23-Feb-04
Sample 3 3 27-Jan-03 13-Feb-04 13-Feb-04
If I may, the SQL below is the select query I created in Counting # of days/months between exams and giving me only those that are 6 months or less; I know 30 is not the exact # of days per month. In viewing the results of this query, I also find data entry mistakes: the Name is listed with only 1 DOE due to the SSN was incorrectly entered for the same person. I can see that if maybe the Database was originally setup correctly, maybe the errors would have been fewer. However, I am still interested in the two issues 1) and 2) above if these will present a problem later. Thanks.
SELECT [qryDIR1 Duplicates tblMFS M D List C_Crosstab].Name, [qryDIR1 Duplicates tblMFS M D List C_Crosstab].DOE2, [qryDIR1 Duplicates tblMFS M D List C_Crosstab].DOE3, [qryDIR1 Duplicates tblMFS M D List C_Crosstab].DOE4, DateDiff("d",[DOE2],[DOE3])/30 AS [Diff2 to 3], DateDiff("d",[DOE3],[DOE4])/30 AS [Diff3 to 4]
FROM [qryDIR1 Duplicates tblMFS M D List C_Crosstab]
WHERE ((([qryDIR1 Duplicates tblMFS M D List C_Crosstab].[Total DateOfExams])>1)) OR (((DateDiff("d",[DOE2],[DOE3])/30)<6)) OR (((DateDiff("d",[DOE3],[DOE4])/30)<6));