all columns not always present in query - report won't run

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report (just a simple table) that I've created from a crosstab
query. I've included all 'columns' in the report, but all the columns are
not always present in the query. Now, when one of the columns is missing,
the report won't run because the report contains a field not in the query.
Is there a way either in the query or report to show all columns specified,
even when there's no data for that column?
 
One option (the easiest) is to enter all possible column heading values into
the Column Headings property of the crosstab query.

Column Headings: "Suzanna", "Rita", "Sean", "Bill", "Steve"
 
Ellen said:
I have a report (just a simple table) that I've created from a crosstab
query. I've included all 'columns' in the report, but all the columns are
not always present in the query. Now, when one of the columns is missing,
the report won't run because the report contains a field not in the query.
Is there a way either in the query or report to show all columns specified,
even when there's no data for that column?
Yes, of course. Instead of using the table as your report's record source,
use a query based on the table instead. For each field that might be missing,
use the nz() function in the query to permit null (missing) entries to be
displayed as [blank] or zero. See the Access help file for the nz() function
for details.
 
Not....

--
Duane Hookom
MS Access MVP


OfficeDev18 via AccessMonster.com said:
Ellen said:
I have a report (just a simple table) that I've created from a crosstab
query. I've included all 'columns' in the report, but all the columns are
not always present in the query. Now, when one of the columns is missing,
the report won't run because the report contains a field not in the query.
Is there a way either in the query or report to show all columns
specified,
even when there's no data for that column?
Yes, of course. Instead of using the table as your report's record source,
use a query based on the table instead. For each field that might be
missing,
use the nz() function in the query to permit null (missing) entries to be
displayed as [blank] or zero. See the Access help file for the nz()
function
for details.
 
Back
Top