Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Filter - How to Remove

Status
Not open for further replies.

xbigblue

Programmer
Jun 20, 2001
39
US
Hello friends,

I am experiencing a problem with issuing the DoCmd Applyfilter in the code behind my Access 2000 report. It appends the filter in my apply filter statement to the last filter issued in the report's filter property. You can imagine the nonsense results I get, since sometimes I programatically issure =A as the filter and other times, depending on the selections in a form preceeding the report, I may choose <>A as the filter. (This is not my exact code but is simplified for this posting.) So, if I issue =A based on selections in first try, and then issue
<>A as the next try, I get - logically speaking - , not correct Access syntax, filter =A and <>A. This leads to the NoData event, since I have generated mutually exclusive filters concatenated together. So the question is: How do I clear the existing filter value before I issue a new value for the filter? If I try applying a null filter (&quot;&quot;), I think that gives syntax error at execution time.

I will certainly appreciate your help.
Thanks, xbigblue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top