What if reports

  • Thread starter gwhaley via AccessMonster.com
  • Start date
G

gwhaley via AccessMonster.com

I have a database with many check boxes and pull down options for each record.
I need to be able to print only the boxes checked or filled in for a
particular record. How do I tell the report or query to print only selected
(filled in) parts of the record?
 
A

Allen Browne

If you have a yes/no field called PickMe, and you want to show the words on
you report only if the box is checked, place a text box on your report and
set its Control Source to:
=IIf([PickMe], "Pick me", Null)

Set the Can Shrink property of the text box to Yes, and now it can shrink
(to zero height) if the yes/no field is No.

There are several issues with getting this to work:
- You may find that you have to put the check box on the report as well
(setting its Visible property to No so it doesn't show), or Access may not
find the field.

- The boxes shrink vertically only. You cannot shrink the space
horizontally, unless you write some code in the Format event of the section,
to set the Left property of each text box.

- The boxes won't shrink if they overlap vertically with other controls.

In the end, the real problem is with the way you have designed your table.
It sounds like you have build a spreadsheet in an Access table. In a
relational database, you do not put many fields in the one table to handle
all the options; you put many *records* in a related table. The problem you
describe completely disappears when you have the right design.

Here's an explanation of the design you need:
Don't use Yes/No fields to store preferences
at:
http://allenbrowne.com/casu-23.html
 

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