Filtered Report returns no values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use a certain form to make a report. In this form there’s a ComboBox where
users can choose a value in order to make a filtered report.

After the user picks a value, he clicks on a OK button and the filtered
report appears on the screen. The problem I’m facing is that when the user
leaves the ComboBox blank, the report returns no items!

It’s as if the report understands that the user selected a non existing
value, returning a blank report.

If the user leaves the ComboBox blank, I wan’t the report to return ALL
values (thinking that the user didn’t apply any filter).

What code do I need to write to do this?

Thank you for your time and assistance.

Antonio.
 
Antionio,

If your report is based on a query you could place the following in the
criteria statement from your query. My guess is that you are using a query
because you are already filtering.

So in the criteriafield typ in something like:

Like ([filter here])&"*"

The asterisk at the end tells the query to return all the rows if nothing is
selected.

hth
 
Thank you very much! Works perfectly.

When I choose nothing on combo1 AND/OR on combo2 and I get ALL results.

I knew the wildcard *, but dodn't know about the &*

THANK YOU!

Maurice said:
Antionio,

If your report is based on a query you could place the following in the
criteria statement from your query. My guess is that you are using a query
because you are already filtering.

So in the criteriafield typ in something like:

Like ([filter here])&"*"

The asterisk at the end tells the query to return all the rows if nothing is
selected.

hth
--
Maurice Ausum


AntonioRio said:
I use a certain form to make a report. In this form there’s a ComboBox where
users can choose a value in order to make a filtered report.

After the user picks a value, he clicks on a OK button and the filtered
report appears on the screen. The problem I’m facing is that when the user
leaves the ComboBox blank, the report returns no items!

It’s as if the report understands that the user selected a non existing
value, returning a blank report.

If the user leaves the ComboBox blank, I wan’t the report to return ALL
values (thinking that the user didn’t apply any filter).

What code do I need to write to do this?

Thank you for your time and assistance.

Antonio.
 
Back
Top