Function as crosstab PARAMETER

EasyCarlo

Registered User.
Local time
Today, 10:38
Joined
Dec 26, 2014
Messages
11
Hi,

Access 2007

I have a report based on a crosstab query with a subreport based on a second crosstab query
both the crosstab queries have the same 3 parameters (2 as string, 1 as boolean) which I pass through a dialog form that closes after the report is opened (in preview)

looks like everything works fine at least for the first page of the report but when I try change page, it prompts me to re-enter the parameters.
First question: why does this happen?

Of course, if a do not close the parameters form I will not have this problem but that is a popup dialog which I do not want to close manually after the operation is done

So I tried to pass the form input first to a Public variable then to a Public Function but I was not able to reference neither of them in the PARAMETER statement of the 2 Xtab queries
As a function, each of the following declarations prompts for input at runtime::
MyFunction, [MyFunction], [MyFunction()], [=MyFunction()]
while the following are not accepted (syntax error)
MyFunction(), =MyFunction()

How can I fix?
many thanks in advance for any kind of help!
Carlo
 
Put these parameters on hidden form

Public functions, as you tried, should work. I use it all time.
= myFunction() should work. Make sure you wrote it correctly.
 
Hi Smig, thank you for help

=myFunction() works in the WHERE statement but it is not accepted by te Xtab PARAMETERS statement (could't even save the query)....
Do you use them in Xtab queries? how do you write the PARAMETERS statement?

tks
Carlo
 

Users who are viewing this thread

Back
Top Bottom