D
Doctor
The following query gives the old #Error. But I can't figure out what is
causing it. My query is based on another query with the following fields:
EventID, Teams, Places, and Lanes. All of these fields are number fields.
I want my current query to figure out how many heats of each event I need to
run during competition. But when I use this I get the #Error. If I switch the
< to * or / or =, I get a number in the query results; but with the < I only
get #Error. For grins and giggles, I posted the entire SQL statement below,
because I know someone will ask.
Thanks in advance.
Trouble Statement:
Heats2: IIf([Teams]<[Lanes],1,0)
Rest of SQL:
SELECT qryEventTeamCount.EventID,
IIf([Teams]<[Lanes],1,IIf([Teams]<(2*[Lanes]-[Places]),2,IIf([teams]<(3*[Lanes]-2*[places]),3,IIf([teams]<(4*[Lanes]-3*[Places]),4,0))))
AS Heats, IIf([Teams]<[Lanes],1,0) AS HeatsTest
FROM qryEventTeamCount;
Both Heats and HeatsTest give the #Error
causing it. My query is based on another query with the following fields:
EventID, Teams, Places, and Lanes. All of these fields are number fields.
I want my current query to figure out how many heats of each event I need to
run during competition. But when I use this I get the #Error. If I switch the
< to * or / or =, I get a number in the query results; but with the < I only
get #Error. For grins and giggles, I posted the entire SQL statement below,
because I know someone will ask.
Thanks in advance.
Trouble Statement:
Heats2: IIf([Teams]<[Lanes],1,0)
Rest of SQL:
SELECT qryEventTeamCount.EventID,
IIf([Teams]<[Lanes],1,IIf([Teams]<(2*[Lanes]-[Places]),2,IIf([teams]<(3*[Lanes]-2*[places]),3,IIf([teams]<(4*[Lanes]-3*[Places]),4,0))))
AS Heats, IIf([Teams]<[Lanes],1,0) AS HeatsTest
FROM qryEventTeamCount;
Both Heats and HeatsTest give the #Error