On Thu, 26 Feb 2004 01:00:13 GMT, "Susan" <sm*****@earthlink.net>
wrote:
Can a textbox on a form be referenced as the criteria for a field in a crosstab
query? When I use an expression like Forms!PFrmCriteria!Criteria, an error
message appears saying Access can not recognize 'Forms!PFrmCriteria!Criteria' as
a field or expression. However, if I put in the actual value of the criteria in
the crosstab query, the query runs fine.
For any query you *can* specify the query's Parameters collection; for
a Crosstab query you *must* do so.
Right mouseclick the grey background of the tables and select
Parameters from the menu you'll see. Add the Forms!... reference (copy
and paste it from the criteria line, it must match precisely) and
specify the datatype (date, number, whatever).
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public