question about report

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

Guest

I have a library database that has 9 different checkboxes for categories. Each book can fit into one or more of these categories. I want to design a report that separtes the books into each category. For example one of the categories is design materials, and I want to group all the books that have this category checked. I also want to do this for the other 8 categories in the report. I'm not sure how to go about grouping it like that since I have 9 individual checkboxes instead of just one field. Any ideas would be greatly appreciated!
 
One way is to use 8 different queries.
the 1st would be a Make Query checking for the 1st category
the 2nd - 8th would be an Append Query to the Table that
you create in the first query.

Then Use the New Table for you report.

You can Call these in a Macro or You run then in the
OnOpen event of the report.

-----Original Message-----
I have a library database that has 9 different checkboxes
for categories. Each book can fit into one or more of
these categories. I want to design a report that separtes
the books into each category. For example one of the
categories is design materials, and I want to group all
the books that have this category checked. I also want to
do this for the other 8 categories in the report. I'm not
sure how to go about grouping it like that since I have 9
individual checkboxes instead of just one field. Any ideas
would be greatly appreciated!
 
You should really have a related table with one record per book per
category. This would allow you to add more categories without adding fields
and controls. I would fix this issue prior to doing any more work. If you
can't then you can create a UNION query:
SELECT bookfield, "Design Materials" as Category
FROM tblLibrary
WHERE [Design Materials] Is True
UNION ALL
SELECT bookfield, "Other Category"
FROM tblLibrary
WHERE [Other Category] Is True
UNION ALL
SELECT bookfield, "Third Category"
FROM tblLibrary
WHERE [Third Category] Is True
....etc...
You can then use this "normalized" structure to create your report.

--
Duane Hookom
MS Access MVP
--

help said:
I have a library database that has 9 different checkboxes for categories.
Each book can fit into one or more of these categories. I want to design a
report that separtes the books into each category. For example one of the
categories is design materials, and I want to group all the books that have
this category checked. I also want to do this for the other 8 categories in
the report. I'm not sure how to go about grouping it like that since I have
9 individual checkboxes instead of just one field. Any ideas would be
greatly appreciated!
 
help said:
I have a library database that has 9 different checkboxes for categories. Each book can fit into one or more of these categories. I want to design a report that separtes the books into each category. For example one of the categories is design materials, and I want to group all the books that have this category checked. I also want to do this for the other 8 categories in the report. I'm not sure how to go about grouping it like that since I have 9 individual checkboxes instead of just one field. Any ideas would be greatly appreciated!


Can a book be in more than one category? If not, you should
be using one option group with 9 values instead of 9
separate check boxes.
 
Back
Top