Access Output should be the Column Header

  • Thread starter Thread starter KHarmon
  • Start date Start date
K

KHarmon

I have Access 2000 and I have a database that has a lot of check boxes. I
would like the output of those columns to be the column header if the boxes
are checked and blank if the boxes are not checked. How would I go about
doing this?
 
KHarmon said:
I have Access 2000 and I have a database that has a lot of check boxes. I
would like the output of those columns to be the column header if the boxes
are checked and blank if the boxes are not checked. How would I go about
doing this?

I'm not clear what you're asking. If I have a table with a Yes/No field
called paid_in_full, I can create a query like this:

SELECT IIf(paid_in_full=True,"Paid In Full","") AS [Paid In Full]
FROM MyTable;

Is that close to what you want?
 
I have Access 2000 and I have a database that has a lot of check boxes. I
would like the output of those columns to be the column header if the boxes
are checked and blank if the boxes are not checked. How would I go about
doing this?

By correcting your flawed table design.

You have a "wide-flat" table structure with data (the header) stored in
fieldnames. This is a very common mistake, especially for people coming to
databases from a spreadsheet background, but as you're finding it's difficult
to work with in a relational database design!

Rather than a spreadsheet with question names as column names, and checkboxes,
consider a normalized table design with *three tables*: a table of Questions
(with one row for each of what are now your column headers); a table of
Respondants or Items or whatever each row of your current table represents;
and a table of Answers, with two fields - a link to the table of Questions'
primary key and a link to the primary key of the Respondants table. Instead of
a checkbox, the existance of a record in the third table would signify a
"hit".
 
Back
Top