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.
Armando Vilela Baiões Self-taughtAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Armando Vilela Baiões Self-taughtAuthor Commented:
Nevermind that, solutionj was in front of me

PARAMETERS [Forms]![frmFScomposicao]![MRDATA1] DateTime, [Forms]![frmFScomposicao]![MRDATA2] DateTime;
TRANSFORM Max(MRodagem1.ListaDeDecores) AS MaxOfListaDeDecores
SELECT MRodagem1.EQUIPA
FROM MRodagem1
WHERE (((MRodagem1.DATA) Between [Forms]![frmFScomposicao]![MRDATA1] And [Forms]![frmFScomposicao]![MRDATA2]))
GROUP BY MRodagem1.EQUIPA
ORDER BY MRodagem1.EQUIPA
PIVOT MRodagem1.producao.DATA;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)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
0
Armando Vilela Baiões Self-taughtAuthor Commented:
Sorry Rey, i must be tired.... it was such a simple solution. Anyway its solved, These crosstabqueries are full of tricks!
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Rey Obrero (Capricorn1)Commented:
oh, didn't see your post. it was not there wile I was typing.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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.
0
Armando Vilela Baiões Self-taughtAuthor Commented:
Thanks to all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.