We help IT Professionals succeed at work.

Criteria in CrosstabQuery

56 Views
Last Modified: 2017-03-11
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.
Comment
Watch Question

Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2016

Commented:
<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

Author

Commented:
Sorry Rey, i must be tired.... it was such a simple solution. Anyway its solved, These crosstabqueries are full of tricks!
CERTIFIED EXPERT
Top Expert 2016

Commented:
oh, didn't see your post. it was not there wile I was typing.
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
Thanks to all!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions