Crosstab

gdanalakshmi

Registered User.
Local time
Today, 22:57
Joined
Nov 26, 2002
Messages
102
I have a parameter query (BaseQry) that takes the parameters from the Form.

THen I built a crosstab query using BaseQry. But when I try to run the crosstab, i get the following error -

Microsoft JEt Engine doesnot recognise [Forms]![ReportMenu]![StartDate] as a valid expression.


But if i hardcode the dates in the BaseQry and then run the crosstab query, i get the expected result.

How do i dynamically specify the parameter for the BAseQry without getting the error
 
Try making another query out of your crosstab and the baseQry and take your critaria out of your baseQry and put it in your new one. That should do the trick:)
 
You have to define the Parameters for the crosstab
ie. Forms!MyForm!MyField Date/Time
 
If I move the criteria to the crosstab query then my query will be lot slower since it is not limited by the criteria.
 
I tried moving the parameter to the crosstab, but still i am getting the same Jet engine error??
 
Thanks for your reply. I just figured it out what Rich suggested.

It is working when I specify the type of the parameters in the crosstab.
 
Brilliant.
I just posted the same problem, but then thought I'd better read the other thread titled "CrossTab".
Wadda you know...quick fix within. (and a fast Edit..Delete so as not to appear an idiot).

For any one with the knowledge, when should one declare parameters for a query?
Does it improve the speed or anything else by doing so?

Richard
 

Users who are viewing this thread

Back
Top Bottom