Report Filter

S

Stew

I want to filter out null entries from a field in my report and am
getting errors on my expressions


My Report is Sourced from a Table called "Table1", the field is
"Field1" that I want to filter out null entries.

* To filer out null entries from this field in the report shouldn't
it be simply enterring:

[Table1].[Field1] is not null (in the Properties/Data/Filter Tab"
Yes (in the Properties/Data/Filter Tab")

Can someone please assist.
 
M

Marshall Barton

Stew said:
I want to filter out null entries from a field in my report and am
getting errors on my expressions


My Report is Sourced from a Table called "Table1", the field is
"Field1" that I want to filter out null entries.

* To filer out null entries from this field in the report shouldn't
it be simply enterring:

[Table1].[Field1] is not null (in the Properties/Data/Filter Tab"
Yes (in the Properties/Data/Filter Tab")


To use the Filter property, you need to set it to a valid
Where condition (e.g. Field1 Is Not Null) and then you need
to add a line of code to the report's Open event procedure:

Me.FilterOn = True

In general, I think it's better to forget the Filter
property and put the criteria in the report's record source
query:

SELECT * FROM Table1 WHERE Field1 Is Not Null

You can enter that directly in the report's Record Source
property or, if you have a reason to, create a query with
that SQL starement, save it and use the query's name in the
record source property.
 

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