I have the following query run through VB:
SELECT Field1, Field2, Field3, Dcount(Field1,tableName,Field5<7) As Field4
WHERE Field1=a, Field2=b
GROUP BY Field1
The Dcount is working correctly, except that it is ignoring the WHERE and GROUP BY in the SQL statement. It is counting all of the records that are <7 in the entire table and returning the same value in each row.
Am I using Dcount incorrectly or should I be using another method to go about this?
Please help,
ctrox
SELECT Field1, Field2, Field3, Dcount(Field1,tableName,Field5<7) As Field4
WHERE Field1=a, Field2=b
GROUP BY Field1
The Dcount is working correctly, except that it is ignoring the WHERE and GROUP BY in the SQL statement. It is counting all of the records that are <7 in the entire table and returning the same value in each row.
Am I using Dcount incorrectly or should I be using another method to go about this?
Please help,
ctrox