Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summarizing Logical Field Data

Status
Not open for further replies.

tallbarb

Instructor
Mar 19, 2002
90
US
A user set up a database with all logical data types for a variety of questions. For instance, he has a table called "Was the Training Useful" with the following logical fields:

Not at all
A little
Somewhat
Mostly
Very

Now, I want to create a column chart in Access XP showing a count for only the TRUE values for all 5 of these fields. For instance, of the 100 attendees, 10 marked Not at All as true, 10 marked A litte as true, 50 marked Somewhat as true, 20 marked Mostly as true and 10 marked Very as true. I'd like to have a legend with the field names and a column chart that shows the values of TRUE for each field.

I swear, I have tried so many things that haven't worked, it's driving me nuts. I have a feeling I'm not seeing the forest for the trees. I assume I need to start with a query that somehow totals all these "true" values - but I can't get that to work either without splitting each question into a separate query, grouping, and then doing a total column for the same field.

I sure could use some help on how to make this work. I feel like an idiot - I know this should be simple (and I am trying not to break down and move all this into Excel) - but my brain refuses to see the answer! Help, help, help - and thank you!!
 
Try using an if statement for each logical field.

In your query, instead of calling the logic fields, use something like this:

NAA : iif ([Not at all] = true, 1, 0)

Then sum the fields.

ChaZ


Ascii dumb question, get a dumb Ansi
 
I found something in the FAQs that worked, too. And it was just as simple as I had thought - I feel SOOOO duhhhh! Simply sum the fields in the query and then use the abs function to display the value.

What would I do without this forum!!

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top