Query problem

PascalZ

New Member
Joined
Mar 17, 2003
Messages
10
I created a report with an underlying query. Additionally I created a form that is called when starting the report to enter the report criteria.
In form there are 5 criteria you can use.
I would like the query to return all entries when selection criteria is left blank. I used the "Is Null" statement for that. Hoever for some reason I'm not able to make a selection on one criteria and leave all others blank. In that case the query has a zero result.

Any ideas?

Best regards,

Pascal. :oops:
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I think this could help you. There is a recent post that asks for what you want and this is how the guy resolved his problem.

In the criteria of the query add:
[Enter Data] OR [Enter Data] IS NULL

So if a user types something into "[Enter Data]" the query returns the data that matches that, if it is blank it returns everything.

Hope this helps o_O
 
Upvote 0

Forum statistics

Threads
1,221,532
Messages
6,160,381
Members
451,643
Latest member
nachohoyu

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