Link to home
Start Free TrialLog in
Avatar of Armando Vilela Baiões
Armando Vilela BaiõesFlag for Portugal

asked on

Criteria in CrosstabQuery

Hello Fellows


My questions is:

Is it possible to do the criteria to this crosstabquery

PARAMETERS [Data de Inicio] DateTime, [Data de Fim] DateTime;
TRANSFORM Max(MRodagem1.ListaDeDecores) AS MaxOfListaDeDecores
SELECT MRodagem1.EQUIPA
FROM MRodagem1
WHERE (((MRodagem1.DATA) Between [Data de Inicio] And [Data de Fim]))
GROUP BY MRodagem1.EQUIPA
ORDER BY MRodagem1.EQUIPA
PIVOT MRodagem1.producao.DATA;

from 2 controls in a form, like a regular similar select query?

Thanks in advanced.

Greetings.
ASKER CERTIFIED SOLUTION
Avatar of Armando Vilela Baiões
Armando Vilela Baiões
Flag of Portugal 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
Avatar of Rey Obrero (Capricorn1)
<from 2 controls in a form, like a regular similar select query?>

just use the Name of form and control in the where clause and remove the Parameters

WHERE MRodagem1.DATA Between Forms!NameOfForm.NameofControl1 And Forms!NameOfForm.NameofControl2
Avatar of Armando Vilela Baiões

ASKER

Sorry Rey, i must be tired.... it was such a simple solution. Anyway its solved, These crosstabqueries are full of tricks!
oh, didn't see your post. it was not there wile I was typing.
the question should be closed by accepting Asker's comment: ID: 42036771 as the answer since he/she solved it by himself.

unless Rey's comment is useful in finding the solution.
Thanks to all!