jollofrice
Registered User.
- Local time
- Today, 17:30
- Joined
- Jun 19, 2007
- Messages
- 27
Every time I run the following query:
SELECT SchedRepQuery_1.LicensePlate, SchedRepQuery_1.VehicleName, IIf((Count([SchedRepQuery_1.Event1]<>"-")=1),[SchedRepQuery_1.Event1],(IIf(Count([SchedRepQuery_1.Event1]<>"-")>1,"CONFLICT","IDLE"))) AS Expr1
FROM SchedRepQuery AS SchedRepQuery_1;
I get runtime error 3122: "You tried to execute a query that does not include the specified expression "*" as part of the aggregate function.
The * equals LicensePlate as the query is written above, but if LicensePlate is removed it will show VehicleName, which if removed, will show the Expr1 equation.
Can anyone tell me why this error is occuring or how to fix it?
SELECT SchedRepQuery_1.LicensePlate, SchedRepQuery_1.VehicleName, IIf((Count([SchedRepQuery_1.Event1]<>"-")=1),[SchedRepQuery_1.Event1],(IIf(Count([SchedRepQuery_1.Event1]<>"-")>1,"CONFLICT","IDLE"))) AS Expr1
FROM SchedRepQuery AS SchedRepQuery_1;
I get runtime error 3122: "You tried to execute a query that does not include the specified expression "*" as part of the aggregate function.
The * equals LicensePlate as the query is written above, but if LicensePlate is removed it will show VehicleName, which if removed, will show the Expr1 equation.
Can anyone tell me why this error is occuring or how to fix it?