0
votes

I'm trying to find out why this is wrong, while in the queries generator it works properly.

SELECT Count(Audi.Id) AS CuentaDeId FROM Audi
    WHERE (((Len." & filtro & ") Between #" & Format(Me!fechamin, "mm/dd/yyyy") & "# And #" & Format(Me!fechamax, "mm/dd/yyyy") & "#))

With some dates slightly different It works, but I think that when It does not find any value in this Table, the error appears. No idea if it's a problem of the Query design, or if there is another way to define it, or not. Any clue, anyone?

Thanks in advance!

1
An Audi table? Do you have a BMW table too? Consider having one common table for all cars! - jarlh
What is Len. alias as it is not defined in query? - Parfait
What are your regional date settings? Would you typically use mm/dd/yyy ? - Tim Williams
What is Audi? A query? What is filtro? Can the date controls be empty (Null)? - Gustav

1 Answers

0
votes

Len is a function name in SQL. That is why Access asked for the parameter. Besides, as Parfait said, Len is used in your query as an alias but not referring to any other table/query.