Short version:
How do I create the “<>” column manually?
Long version:
In Access 2003, I’ve got a table which contains integer values from 1-5, which can also be undefined. When I create a pivot table query on that column, the wizard builds me a table with 6 columns, labeled 1-5 and the first one “<>”, which counts the number of undefined values. This is just the result I need, except for the problem that if the original data misses a certain value (e.g. no record has the value ‘5’), that column is missing in the crosstable. This breaks my report. As I learnt, the normal way to solve this is to set the column headings manually (either via the properties -> column headings dialog or with the IN clause of the PIVOT statement), so that empty columns may result. Unfortunately I have no idea what name the column for the undefined values takes?
OFC there may be another solution for my basic problem, so alternately I’m happy on hints how to create my report so that it can take its data from a query with a varying number of cols, I only know that Nz() is not the solution in this case.
How about: