I have a crosstab query that has the error: The Microsoft Jet engine database does not recognize [Forms]![frmMasterYear]![frmYear] as a valid field or expression.
I have a query called C/Y companies which displays the year and company fields from one of my tables, with the criteria in the year field being [Forms]![frmMasterYear]![frmYear]. Basically, this shows all companys that have a year field in the database equal to what has been selected in the form. In a seperate query (called GeographicFinanicalData) I have joined the company name in the C/Y Companies query to the table which I am getting my fields from as to only show results for companies who have a record with the year matching what is selected in the form. I then use a crosstab query to get summary data from the GeographicFinancialData query. All of the other queries work as a standalone process, however the crosstab query gives the error mentioned above. The crosstab query will work if I change the criteria in the C/Y companies table to something like (SELECT max([Year]) from [4 Premium Analysis]) - I originally had this criteria but I want to change to allow the user to be able to control what year is used as the criteria.
Any suggestions on how to get this to work would be greatly appreciated.
I have a query called C/Y companies which displays the year and company fields from one of my tables, with the criteria in the year field being [Forms]![frmMasterYear]![frmYear]. Basically, this shows all companys that have a year field in the database equal to what has been selected in the form. In a seperate query (called GeographicFinanicalData) I have joined the company name in the C/Y Companies query to the table which I am getting my fields from as to only show results for companies who have a record with the year matching what is selected in the form. I then use a crosstab query to get summary data from the GeographicFinancialData query. All of the other queries work as a standalone process, however the crosstab query gives the error mentioned above. The crosstab query will work if I change the criteria in the C/Y companies table to something like (SELECT max([Year]) from [4 Premium Analysis]) - I originally had this criteria but I want to change to allow the user to be able to control what year is used as the criteria.
Any suggestions on how to get this to work would be greatly appreciated.