Filtered Report returns no values

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.
 
G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top