Link to home
Start Free TrialLog in
Avatar of Gary Croxford
Gary CroxfordFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MS Access Type Mismatch in Query to Count Instances of a String

Thank you for looking at my question,

I am trying to build a query that counts the number of occurrences of a string "On Time" in a query but it falls over with a type mismatch - why is that and please how do I fix it?

SELECT
qry2015_Receipts_to_Report_Detail.[BP Id],
qry2015_Receipts_to_Report_Detail.[BP Name],
qry2015_Receipts_to_Report_Detail.[Recd Year],
qry2015_Receipts_to_Report_Detail.[Recd Month],
Count(qry2015_Receipts_to_Report_Detail.[Delivery Perfomance]) AS [On Time]

FROM qry2015_Receipts_to_Report_Detail
GROUP BY qry2015_Receipts_to_Report_Detail.[BP Id], qry2015_Receipts_to_Report_Detail.[BP Name], qry2015_Receipts_to_Report_Detail.[Recd Year], qry2015_Receipts_to_Report_Detail.[Recd Month]

HAVING (((Count(qry2015_Receipts_to_Report_Detail.[Delivery Perfomance]))="On Time"));
ASKER CERTIFIED SOLUTION
Avatar of Gary Croxford
Gary Croxford
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial