View Full Version : crosstab query question


rutica
03-19-2009, 06:00 PM
Can I make a crosstab query that filters from a value in a combo box? When I try, I get a message that "The Microsoft Jet database engine does not recognize 'Forms!MyFormName!My ComboBoxName' as a valid field name or expression."

Please look at the attached database, at the form called frmEscalationReports. There are 2 buttons: the Detail button works and opens a report filtered on my combo box value. That report uses the query called qryDetail and that query is filtered by [Forms]![frmEscalationReports]![cboEscalation].

But my Summary query button doesn't work. The Summary query is the Crosstab query I tried to build called qrySummary.

Thanks,

Kiwiman
03-20-2009, 12:16 AM
Howzit

Make sure you add the combobox control as a paramater in your crosstab query, with the correct datatype.

Open your crosstab in design view, then from the Query Menu select "Paramaters", then add the detail in here - the name of your combobox control, something like [Forms]![yourform]![yourcontrol] and the data type.

It should work if you add the correct details there.

rutica
03-20-2009, 07:00 AM
Perfect!! it works.

Thanks!

Rx_
03-10-2010, 10:44 AM
Please share the solution code. Would like to take a look at that.:rolleyes:

rutica
03-10-2010, 11:38 AM
i'm at work and can't upload or download my database here. i will upload my database tonight though.

but did you try what kiwiman said: "Open your crosstab in design view, then from the Query Menu select "Paramaters", then add the detail in here - the name of your combobox control, something like [Forms]![yourform]![yourcontrol] and the data type."

rutica
03-10-2010, 06:00 PM
The database is attached.

The change I made was: I opened the query called qrySummary in design view. I went to Query, Parameters. In the Parameter column, I typed [Forms]![frmEscalationReports]![cboEscalation]. In the Data Type column, I choose Integer.

Before the change, when i clicked the button 'Open Summary Query' in the form 'frmEscalationReports', it wouldn't work.

After adding the parameter to the query, it works.