Sorry, but your table design is not just inefficient. Inclusion of 50 questions breaches first normal form rules about separation of repeating groups into their own tables. Relational tables rarely have more than a few tens of fields at most - so 150 fields before your questions were added says straight away that your table design is not normalised. I guess it looks more like an Excel free-form table, containing many entities which should be split out into their own tables.
You can't work on unnormalised data with a relational database and get anything like the flexibility and performance you could with normalised data. You are also throwing away the power of the database engine, which is designed to optimise table performance where one-to-many relations have been designed and enforced from the start.
As general advice on table design please see the following HowTo article on
Database Normalisation and Table Structures.
In terms of the question problem you should have at least a separate question table, and a response table linking account and question. To add to your plight your individual response fields should simply have been boolean (yes/no) values, not numerics taking the value 1 and 2.
I have corrected the where clause below as far as I can, but your design problems have already taken you past Access's 255 field limits (the reason you cannot add more questions to your table).
You need to redesign your tables from scratch. As it is your table design I am sorry to say is not just inefficient it is completely unmaintainable, and there is no point in trying further workarounds...
-Stewart
- SELECT Originations_RE_US.Sample_Month, Count(Originations_RE_US.Acctno) AS [TO]
-
FROM Originations_RE_US
-
WHERE ([Q1]=1 Or [Q2]=1 Or [Q3]=1 Or [Q4]=1 Or [Q5]=1 Or [Q6]=1 Or [Q7]=1 Or [Q8]=1 Or [Q9]=1 Or [Q10]=1 Or [Q11]=1 Or [Q12]=1 Or [Q13]=1 Or [Q14]=1 Or [Q15]=1 Or [Q16]=1 Or [Q17]=1 Or [Q18]=1 Or [Q19]=1 Or [Q20]=1 Or [Q21]=1 Or [Q22]=1 Or [Q23]=1 Or [Q24]=1 Or [Q25]=1 Or [Q26]=1 Or [Q27]=1 Or [Q28]=1 Or [Q29]=1 Or [Q30]=1 Or [Q31]=1 Or [Q32]=1 Or [Q33]=1 Or [Q34]=1 Or [Q35]=1 Or [Q36]=1 Or [Q37]=1 Or [Q38]=1 Or [Q39]=1 Or [Q40]=1 Or [Q41]=1 Or [Q42]=1 Or [Q43]=1 Or [Q44]=1 Or [Q45]=1 Or [Q46]=1 Or [Q47]=1 Or [Q48]=1 Or [Q49]=1 Or [Q50]=1 Or [Q51]=1 Or [Q52]=1 Or [Q53]=1 Or [Q54]=1 Or [Q55]=1 Or [Q56]=1 Or [Q57]=1 Or [Q58]=1 Or [Q59]=1 Or [Q60]=1 Or [Q61]=1 Or [Q62]=1 Or [Q63]=1 Or [Q64]=1 Or [Q65]=1 Or [Q66]=1 Or [Q67]=1 Or [Q68]=1 Or [Q69]=1 Or [Q70]=1 Or [Q71]=1 Or [Q72]=1 Or [Q73]=1 Or [Q74]=1 Or [Q75]=1 Or [Q76]=1 Or [Q77]=1 Or [Q78]=1 Or [Q79]=1 Or [Q80]=1 Or [Q81]=1 Or [Q81]=1 Or [Q82]=1 Or [Q83]=1 Or [Q84]=1 Or [Q85]=1 Or [Q86]=1 Or [Q87]=1)
-
GROUP BY Originations_RE_US.Sample_Month;