I need to analyze the frequency with which paired true-true combinations of 50+ true/false variables occur together. To this end, I have a table of test results stored in an Access database. I'm trying to build a query that will accept a parameter of field name, so that I can control which two fields are being evaluated as 'true-true' and counted. Once I have the query working I'll code some VB to vary the fields being evaluated and pass the results to Excel for analysis.
The weird thing is, when I hard-code the field names into the query, they work fine. But when I change the field names to be input parameters, the query ends up counting all records instead of only the 'true-true' combinations.
Here's the SQL:
SELECT Count(TST_Combinations.[c1]) AS CountOf1
FROM TST_Combinations
WHERE (((TST_Combinations.[c1])=True And (TST_Combinations.[c2])=True));
Any suggestions? I reeeeally don't want to manually create the 1250 or so queries it takes to do this analysis!
Thanks.
The weird thing is, when I hard-code the field names into the query, they work fine. But when I change the field names to be input parameters, the query ends up counting all records instead of only the 'true-true' combinations.
Here's the SQL:
SELECT Count(TST_Combinations.[c1]) AS CountOf1
FROM TST_Combinations
WHERE (((TST_Combinations.[c1])=True And (TST_Combinations.[c2])=True));
Any suggestions? I reeeeally don't want to manually create the 1250 or so queries it takes to do this analysis!
Thanks.