Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a table that holds data from a survey that was completed by employees
in our firm. The survey mainly consisted of True/False question/answers.
There are over 50 questions in the survey.

I would like to create a query that lists all employees that selected False
for any of the questions. Is this possible?

Many thanks for any assistance

B
 
I tried this. The problem is I have over 50 questions, so when i enter this
as a criteria under all the Yes/No fields, I get nothing back. I think that's
because the Query is assuming that I am looking for when Q1 is false AND Q2
is false and Q3 is false and so on.

I need the query to look for where the employee has answered false to any of
the questions.

Thanks

B
 
You are probably using the query grid to build your query. If you put False on
the same criteria line under each question you will be doing as you said.

Try stairstepping the criteria, Putting the false in a different criteria row
under each column, you will have to use the insert row menu item to add
additional rows.

Want an easier way? Create your query in the standard way but without any
criteria. Now Select SQL from the view menu and type criteria at the end of the query.

SELECT <your list of fields to display>
FROM YourTableName
WHERE False In (<your list of TF Fields>)

Something like:

SELECT EmployeeName
FROM SurveyTable
WHERE False in (Tf1,Tf2,Tf3,Tf4)

If your field names are long, you may have to break that into

WHERE False in (Tf1,...,TF10) OR False in (TF11,...,Tf20) OR ...

This would be simpler with a better structure where your table for answers to
the questions would be something like:

TableResponsesReceived
EmployeeID
QuestionID
Response

Then your query would be simple to write

SELECT Distinct EmployeeName
FROM SurveyTable INNER JOIN TableResponsesReceived
 
Back
Top