Pass query parameters from Form to crosstab

rodmc

Registered User.
Local time
Today, 22:39
Joined
Apr 15, 2010
Messages
514
HI Folks

Ive got a form which lets the user input parameters for queries/reports. Now this works fine with standard SELECT queries, but I cant get it to work with crosstabs. The crosstab query tells me the fields are not recognised (even though the criteria in the query is the same as the SELECT queries). Is there a reason for this that Im overlooking?

Thanks

Rod
 
I should probably add that Ive added the path to the values in the form in the criteria ie:
[Forms]![FormName]![Field]
 
Is the form opened before you run the query? It must be open before running the query.
 
I've found that you need to put in the parameters in both the underlying query and the crosstab from it. So, when you have your query open in design view you go to QUERY > PARAMETERS and enter them there - the form reference and the datatype.
 
the form is opened and I have declared the parameters in the Parameters box, BUT I haven't declared them in full

I'll give that a shot Bob

thanks guys
 
entered them in full but now its throwing up parameter input boxes, god thats friggin annoying :(
 
entered them in full but now its throwing up parameter input boxes, god thats friggin annoying :(
It's either a field name you've changed, or a field name you've typed in incorrectly if it's throwing the error in the query.
 
attachment.php


Was thinking that I might have made a typo somewhere, cant see it though, cant see the woods from the tree's at this point;)
 

Attachments

  • FET1.jpg
    FET1.jpg
    85.3 KB · Views: 2,749
A few more questions:

1. Is Start the name of the textbox or the name of the field?
2. Is the textbox name the same as the field name?
3. Is Referral a table or a query? If it is a query, are you sure you don't a prompt in there as well?
 
Start is the name of the textbox as is End, the fields and controls are different names (field name is ActDte) and Referral is indeed a table

wife just logged me out to play solitaire :confused: thats just totally irrelevant and bizarre, but hey, there you go, seems to be the way of my thinking of recent :D
 
Interesting!! Can we see a copy of your db (when your wife allows you to log back in)? :D

Maybe you should buy her a Wii ;)
 
Ive got some test data in it, but its not genuine data, so I suppose I could.

Ive got a wii, but then it isnt wired up cos my xbox is, priorities n all that :D

Right, I know its a bit of a nick but I do tidy things up before I deploy it, honest lol, oh and the naming conventions :o
 

Attachments

Looks like the Xbox has its rightful place :D

You've got quite alot of queries in your db and it might take a while to plough through to find the problem one. Maybe a hint of the query name might help? ;)
 
Looks like the Xbox has its rightful place :D

You've got quite alot of queries in your db and it might take a while to plough through to find the problem one. Maybe a hint of the query name might help? ;)

Discharged1
 
your right about the queries though could probably cut down on them but sometimes its the nature of where I work, targets for everything
 
It works for me. I don't think you had the form open. When I say open, I mean the form must be in Form view, not design view with the Start and End Dates entered.
 

Users who are viewing this thread

Back
Top Bottom