ymalcolm
12-04-2001, 12:14 PM
Just to let all you lovely helpers out there know, I have read every entry on parameter/crosstab queries in the forums and none of them is giving me different results when I implement them in my query, so, here goes:
customer_query1 queries three separate tables: customer (for the customer's name), order (for the amount of the item purchased), and year (for the year in which the item was purchased).
--n.b. my database actually deals with charitable foundations and grants, but it is easier to bring it back to the good old fashioned customer model for clarity--
Then I have a cross-tab query which references customer_query1 to get the data for its fields so that I can see the customer name in the rowheadings, the year in the columnheadings, and the amount in the fields. This crosstab query enables me to use the values of year_id (year 1, year 2, year 3, etc.) as column headings of their own, which I then use for...
Then I use the information in customer_crosstab_query in the "final" query which uses customer_crosstab_query along with several new elements from new tables to give a general overview of matters pertaining to the customer. The reason this select query needs to reference the crosstab query is so the select query can use individual year names as column headings (for anyone who has read more than one of my questions on these forums, I know I'm impossibly verbose - my apologies).
Now: when I want to allow the user to enter only part of a customer's name as a parameter Like [Enter Customer Name:] AND "*", I get the message about jet engines not understanding etc. etc. Okay, so I go and specify the parameter in the query parameters dialog box and run the query, at which point I get an error telling me the brackets are wrong.
Help.
I've been cutting and pasting from Criteria field to Query Parameters dialog, so it's not a question of mismatched parameters, what is it? I'm thoroughly stumped and the three Access books that litter my desk are of absolutley no help.
Thanks so much for yours,
Yelena
customer_query1 queries three separate tables: customer (for the customer's name), order (for the amount of the item purchased), and year (for the year in which the item was purchased).
--n.b. my database actually deals with charitable foundations and grants, but it is easier to bring it back to the good old fashioned customer model for clarity--
Then I have a cross-tab query which references customer_query1 to get the data for its fields so that I can see the customer name in the rowheadings, the year in the columnheadings, and the amount in the fields. This crosstab query enables me to use the values of year_id (year 1, year 2, year 3, etc.) as column headings of their own, which I then use for...
Then I use the information in customer_crosstab_query in the "final" query which uses customer_crosstab_query along with several new elements from new tables to give a general overview of matters pertaining to the customer. The reason this select query needs to reference the crosstab query is so the select query can use individual year names as column headings (for anyone who has read more than one of my questions on these forums, I know I'm impossibly verbose - my apologies).
Now: when I want to allow the user to enter only part of a customer's name as a parameter Like [Enter Customer Name:] AND "*", I get the message about jet engines not understanding etc. etc. Okay, so I go and specify the parameter in the query parameters dialog box and run the query, at which point I get an error telling me the brackets are wrong.
Help.
I've been cutting and pasting from Criteria field to Query Parameters dialog, so it's not a question of mismatched parameters, what is it? I'm thoroughly stumped and the three Access books that litter my desk are of absolutley no help.
Thanks so much for yours,
Yelena