473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Crosstab Query Criteria

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.

Thank you!

Susan
Nov 12 '05 #1
3 2439
Susan 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.


The form the query's parameter is reading must be open & have a valid
value in the control.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

Nov 12 '05 #2
For a cross-tab query, the references must be declared explicitly.
Use the little dialog box under Query - Parameters.

HTH
- Turtle

"Susan" <sm*****@earthlink.net> wrote in message
news:xy*******************@newsread1.news.atl.eart hlink.net...
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.

Thank you!

Susan

Nov 12 '05 #3
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
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
4
by: No Spam | last post by:
Dear Access 2000 users, I have a crosstab query that puts together certain information perfectly. It has a criteria that is based on a form that limits how many columns are returned based on...
2
by: Sherman H. | last post by:
I have a few questions for crosstab and popup form questions: 1. I created a crosstab as follows: IT Financial Operation John 21 22 ...
4
by: Judy | last post by:
I'm using Access 2003 and was wondering if it is possible to have a paramater selection within a crosstab query so that I wouldn't need to build a new table. I have a select query that I'm using...
2
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic...
2
by: x | last post by:
hi i have made a crosstab query in which row heading is "date", colum heading is "aircraft type" and the value to be summed up is "1-10 row totals". i want to create a simple query which should...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
4
by: rdsandy | last post by:
Hi, I have some code below in VBA for Access 2003 which is on a button called "RentalCrosstabPercTtlQtyMonthLoc_Click". This is a crosstab query which brings up rental items down the side, who...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.