Query Criteria

gothung

New Member
Joined
Jun 3, 2002
Messages
32
Is there any way that I can show the criteria that a query is filtered on in a text box in a report
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Here is one solution:

Create a form where you enter the criteria into text or list boxes and a button to run the query. On the form that shows the results put a text box with with something like this;
="Searched for " & [Forms]![Your Form]![Combo or text02 ]

Hope this helps
Dr_Worm
 
Upvote 0
I had my form and filters (there are 5 of them, and they come from combo boxes) set up exactly the way you described. The only problem is that the formula you gave me didn't work. The formula Shows results for all filtered records, rather than just showing me the selections I made. I may only choos 1 of the 5 filters, or I may choose 3 and so on. As a result I want to just see what I selected. All formulas I have tried show me the data in the query. If I go into design veiw of the query, it shows me only the fields that I chose, and the criteria is what I am really after. Any help would be great!!!
 
Upvote 0

Forum statistics

Threads
1,221,557
Messages
6,160,477
Members
451,650
Latest member
kibria

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top