crosstab query question

rutica

Registered User.
Local time
Today, 16:12
Joined
Jan 24, 2008
Messages
87
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,
 

Attachments

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.
 
Last edited:
Perfect!! it works.

Thanks!
 
Please share the solution code. Would like to take a look at that.:rolleyes:
 
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."
 
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.
 

Attachments

Users who are viewing this thread

Back
Top Bottom