Report filter question

D

Dennis

Hi,

I've done filters many times before, but something is not right and I can
not see it.

My report is running of a query which has NO selection criteria in it. It
is just a logical view of a table.

I have the following code in my report (it is hard coded only because I'm
trying to debug the code":


Me.Filter = "(((tblMailingList.MemType)='MT-S'))"
Me.FilterOn = True


I know that the filter code is correct because I went into design query and
put MT-S for the Criteria in the field MemType and view the resulting SQL
code. I then copied that code to the program.

When I run the query with the criteria, the query produces the correct
results. I then remove the criteria, and run the report. I put a break in
the code so I know the value of Me.Filter.

However, the filter does not work. I get all of the data, not just the
members with a MemberType = "MT-S".

Any suggestions? I know it is something stupid, but I just don't know what
it is.


Dennis
 
D

Dennis

All,

I found it.

I need ot use me.report.filter and me.report.filteron.

Thanks

Dennis
 

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