Parameters in a CrossTab Query

adamnorsworthy

Registered User.
Local time
Today, 08:23
Joined
Nov 9, 2005
Messages
13
Hey,

I am trying to enter a user-defined parameter in a CrossTab query with little luck. It works fine if I enter the code already defined as in: >= #12/06/2006# but when I enter the code for a user-defined / input such as: >= [Enter date:], or if I try to redirect to a textbox on the active Form such as: >=[Me]![dfrom.Value] I get the error "Invalid field or Expression), although this syntax / code works fine if I do this in a normal query.

Any suggestions?

Kind regards, Adam.
 
Crosstab queries require that their parameters be explicitly declared. In design view, Query/Parameters.
 
Two things

1 - you need the full reference, through the forms collection - not just Me!... cause the query doesn't know which form it is

Forms!frmYourForm!dfrom

2 - then you need to "declare" the parameters. When in query design, at the bottom of the Query menu, you'll find the Parameters. There, enter the whole reference in the left box (parameter column), and in the Datatype dropdow, chose the appropriate datatype (Date/Time)
 

Users who are viewing this thread

Back
Top Bottom