K
katy.wortman
In my database, I have checkboxes for 6 different industries. I would
like to create a report that shows the total number of records where
the box is checked for each of the six industries. To do this, I
figured I would first need to create a query.
I went through the query design wizard and created a query that would
sum each of the 6 variables and the show the total count of records in
the table.
When I run the query, I get yes/no answers for each field, not numbers
(what I would like to see).
One thing that seems weird to me is that when I click in the query
results field for each individual variable, the correct number
appears. However, as soon as I click outside of the field, it returns
to yes/no rather than a number. When I create a report using data
from this query, it also returns yes/no as the sums rather than
numbers.
My SQL code:
SELECT DISTINCTROW ABS(Sum([Corporate Practice 012207].[Food and
Beverage])) AS [Sum Of Food and Beverage], ABS(Sum([Corporate Practice
012207].Automobile)) AS [Sum Of Automobile], ABS(Sum([Corporate
Practice 012207].Pharmaceutical)) AS [Sum Of Pharmaceutical],
ABS(Sum([Corporate Practice 012207].Guns)) AS [Sum Of Guns],
ABS(Sum([Corporate Practice 012207].Alcohol)) AS [Sum Of Alcohol],
ABS(Sum([Corporate Practice 012207].Tobacco)) AS [Sum Of Tobacco],
Count(*) AS [Count Of Corporate Practice 012207]
FROM [Corporate Practice 012207];
Any help or ideas would be great!
like to create a report that shows the total number of records where
the box is checked for each of the six industries. To do this, I
figured I would first need to create a query.
I went through the query design wizard and created a query that would
sum each of the 6 variables and the show the total count of records in
the table.
When I run the query, I get yes/no answers for each field, not numbers
(what I would like to see).
One thing that seems weird to me is that when I click in the query
results field for each individual variable, the correct number
appears. However, as soon as I click outside of the field, it returns
to yes/no rather than a number. When I create a report using data
from this query, it also returns yes/no as the sums rather than
numbers.
My SQL code:
SELECT DISTINCTROW ABS(Sum([Corporate Practice 012207].[Food and
Beverage])) AS [Sum Of Food and Beverage], ABS(Sum([Corporate Practice
012207].Automobile)) AS [Sum Of Automobile], ABS(Sum([Corporate
Practice 012207].Pharmaceutical)) AS [Sum Of Pharmaceutical],
ABS(Sum([Corporate Practice 012207].Guns)) AS [Sum Of Guns],
ABS(Sum([Corporate Practice 012207].Alcohol)) AS [Sum Of Alcohol],
ABS(Sum([Corporate Practice 012207].Tobacco)) AS [Sum Of Tobacco],
Count(*) AS [Count Of Corporate Practice 012207]
FROM [Corporate Practice 012207];
Any help or ideas would be great!