1. I have created a base query as the foundation for a CrossTab Query.
2. The base query works fine – the results are what is expected. I have 114 records come back that have a blank FirstName and blank LastName fields.
3. When I run the Cross Tab query – only 9 records come back with blank fields.
What – where are the others? There is nothing going on. It is a simple Base query and then using the Base query to create the Crosstab query.
I hope this is enough info.
Here is the code for the Base query:
SELECT tblPeople.MemberID, tblPeople.MemberWholeName, tblPeople.Telephone1, tblPeople.Company, tblPeople.Signature, tblAnnualAppealHistory.Year, tblAnnualAppealHistory.Amount, tblPeople.LastName, tblPeople.FirstName, IIf(IsNull([LastName]),[Company],[LastName]) AS LastNameOrCompany
FROM tblPeople INNER JOIN tblAnnualAppealHistory ON tblPeople.MemberID = tblAnnualAppealHistory.MemberID
ORDER BY tblPeople.LastName;
Here is the code for the Crosstab:
TRANSFORM Sum(qryAABaseAllMembers.Amount) AS [The Value]
SELECT qryAABaseAllMembers.FirstName, qryAABaseAllMembers.LastName, qryAABaseAllMembers.Telephone1
FROM qryAABaseAllMembers
GROUP BY qryAABaseAllMembers.FirstName, qryAABaseAllMembers.LastName, qryAABaseAllMembers.Telephone1
ORDER BY qryAABaseAllMembers.LastName
PIVOT qryAABaseAllMembers.Year;
Soc