PDA

View Full Version : Cross tab query



wasim_sono
07-05-2007, 02:33 AM
Dear All

I have created report based on a cross tab query. the snap shot of that query is available at following address.

http://www.esnips.com/webfolder/3e7628fa-77da-4663-8923-47d853ebad9f

I want to allow user that he pick required monthyear from a criteria form named "Reportmenu". but I couldn't. But if I manually entered e.g. 062007 in query criteria field then query run and gives required result.

Have any one any idea?

Thanks in advance for any type of help.

Wasim

OBP
07-05-2007, 05:09 AM
Wasim, for some obscure reason CrossTab Queries do not like Criteria Inputs form users.
You could try moving the Criteria to a Pre Query, which just filters the records. You would then base your Crosstab Query on the Pre Query.
That sometimes works.
You can save your Form selections to a Table that holds Temporary data.
You would then include that table in the Crosstab with the 2 tables Linked. Or you could try using the value held in that Temp table in a Criteria using the Dlookup Function.
If you can post or email a zipped copy of the Database I can take a look for you.

mattj
07-09-2007, 12:51 PM
For form criteria to function correctly in a crosstab query, you must explicitly define them in the query parameters. Right-click in the table grid of the query, select parameters. Enter the reference to your form control, and set its data type.

HTH
Matt