Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Count Questions in Access 2010 Table

Posted on 2015-02-09
1
Medium Priority
?
123 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

722 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