Can I display just the fieds that are checked

M

Mike

I have a table with a number of yes/no check box fields (one check box for
each test). I am looking for a way to create a report (or a query) that will
display just the fields that are checked for each record. So for example if
record 1 only had boxes 2&3 checked only fields 2&3 would be displayed and
fields 1, 4,5… would not be displayed. Any help would be great! Thank you
 
J

John Spencer

You can't do that in a query. Queries are homogenous and always return the
same columns.

You can do it in a report using a bunch of vba code to hide the controls and
move controls (and label controls) around.

If you are willing to restructure your tables you can probably do this fairly
easily. But it will take creating at least one new table and moving all the
checkbox information into the table. One record in your current table will
become multiple records in the new table.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
M

Mike

Thanks for the info. Breaking out the checkboxes into another table and
creating a bunch of records for each sample sounds like it might add a bunch
of extra complexity…does it rely complicate the database? It might just be
worth displaying all the fields with a yes/no if it complicates things.
Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top