[AccessD] Crosstab Querry with parameter on Form (A97)

Arthur Fuller artful at rogers.com
Mon Mar 10 08:02:00 CST 2003


IME the best way to get around the limits of crosstab queries is to first
create a query that gets all the data you need, then create a crosstab query
that uses the first query as its source.
Capture the values from your form using static functions, and then call
those in the first query. The crosstab won't even see them.
If you're unfamiliar with static functions, search the message base and you
should find several messages in which I describe their purpose and use.
A.

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Steve Grant
Sent: March 10, 2003 8:40 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Crosstab Querry with parameter on Form (A97)

Access 97

Hi all,

I am running into a problem that eludes me.

I have a query that uses a form to get it's parameters.
This is what's in the criteria section of the query.
Between [forms].[frm_Param]![txt_StartInvoiceDate] And
[forms]![frm_Param].[txt_EndInvoiceDate]

When I run that query, everything works fine, i.e. the correct records are
displayed.

But, when I use that query in a crosstab query, I get the following error
msg:
"The Microsoft Jet Database engine does not recognise
[forms].[frm_Param]![txt_StartInvoiceDate]
as a valid field or expression."

The crosstab query works fine if I use dates instead of a reference to a
field on a form. So if I put:
Between #01/01/2003# And #01/31/2003# in the non crosstab query, the
crosstab query works fine.

I tried putting the criteria directly in the crosstab query and I get the
same error msg.

Anyone as an idea why this is hapening?

Thanks,


Steve


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list