problems with parameters in crosstab query

A

Anton Hoetelmans

I've created a report based on a crosstab query, in which I, depending on
parameters on a startup form, want to display a specific selection of data.
Cross tab queries only kan be made conditional by making it a
parameterquery, but then you get a pop-up window asking for parameter
nvalues.

I found out that it should be possible to pass the paramaters from code, by
using the Inputparameters property of the report, but I can't get it to
work.

I've placed the cross-tab query in the record source property and added to
the On Open event the line "Me.InputParameters = "pKlant double = X"".

But if i run the report, I get the runtime error "2455:
You entered an expression that has an invalid reference to the property
inputparaneters"

Can anybody help me with this?

thanks in advance,

Anton



Nu schijn je met de inputparameters property van het report hier vooraf
invulling aan te knnen geven, maar ik krijg dat niet voor elkaar.
Ik heb dus de cross-tab query als record source gedefinieerd en heb in het
On Open event de regel "Me.InputParameters = "pKlant double = X"" opgenomen,
echter als ik dan het report opstart, dan krijg ik de runtime error "2455:
You entered an expression that has an invalid reference to the property
inputparaneters"

Wie kan met tips of een voorbeeld geven hoe dit werkend te krijgen?

Alvast bedankt,
 
G

Geoff

Could you design a query to prompt for the parameters
and base your crosstab query on that query?

If you need to collect the parameters using a startup
form (as you've said), then it gets a bit more difficult
to explain.

Regards
Geoff
 
A

Anton Hoetelmans

Geoff,

Thanks for the reply.

I've tried this and it does work. I have to define a SELECT * query on a
table and use that query as base (with parameters) and then it works.

It is a good workaround. I'm still interested however in how to use the
inputparameters option: I think it is a better way of handling than this
workaround. (Need for an extra query etc.)

Can you help me with this?

Thanks again,

Anton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top