Solved

Count Questions in Access 2010 Table

Posted on 2015-02-09
1
106 Views
Last Modified: 2015-02-09
I have an access table that I need to count the non-null values in each row. In the attached spreadsheet notice the count in the Total_Questions Column. I'm trying to figure out how to calculate either in a query or using VBA, Thanks
Count.xlsx
0
Comment
Question by:shieldsco
1 Comment
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 40599706
you can use a query like this

select
Iif([q1] & ""<>"",1,0)  +
Iif([q2] & ""<>"",1,0)  +
Iif([q3] & ""<>"",1,0)  +
Iif([q4] & ""<>"",1,0)  +
Iif([q5] & ""<>"",1,0)  +
Iif([q6] & ""<>"",1,0)  +
Iif([q7] & ""<>"",1,0)  As Total_questions
From TableName
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
microsoft access - xml 10 29
Dealing with Null in VBA sql statement 9 25
Sending Attachment via CDO 3 22
Stored Procedure 2 0
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now