<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2726.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><STRONG>Nancy,</STRONG></DIV>
<DIV> </DIV>
<DIV> I have not seen any reply to your post so far. Certain
points arising out of my experimentation on the subject are given below.</DIV>
<DIV> </DIV>
<DIV> When passing the filter criteria string as an argument
while opening the report via DoCmd method, no need to tinker
with the filter properties of the report through any of its internal events. In
any case whatever is done in the close event of the report does not necessarily
get saved for next occasion.</DIV>
<DIV> </DIV>
<DIV> Following steps are recommended -</DIV>
<DIV> (a) Open the report in design view</DIV>
<DIV> (b) In the properties dialog box, make sure that -</DIV>
<DIV> (i) Filter is set to
<STRONG><EM>Blank</EM></STRONG></DIV>
<DIV> (ii) FilterOn is set
to<STRONG><EM> No</EM></STRONG></DIV>
<DIV> (c) Remove all statements reg filter properties (e.g
Me.Filter = "" and Me.FilterOn = False) from report's events.</DIV>
<DIV> </DIV>
<DIV> After the above steps, there should be no problem in
getting proper response if the following statements are executed
one after the other. (R_TEST is the name of report while Crs1 & Crs2
are criteria strings). <EM>The report should be in closed state before
executing fresh statement</EM> -</DIV>
<DIV>(1) DoCmd.OpenReport "R_TEST", acViewPreview, , Crs1 </DIV>
<DIV>(2) DoCmd.OpenReport "R_TEST", acViewPreview, , Crs2<BR>(3)
DoCmd.OpenReport "R_TEST", acViewPreview</DIV>
<DIV> (Statement 3 means no filtering
action)</DIV>
<DIV> </DIV>
<DIV> Note - To help appreciate what is
happening - Open the report as per (1) or (2) and then change
its view to design view. On opening the property window, it would be
observed that Filter property carries the value Crs1 or Crs2 as the case may be.
FilterOn property continues as <STRONG><EM>No.</EM></STRONG> <EM><U>Do
not click save button at this stage.</U></EM> When the report is
finally closed and then opened in design view, the filter property will be found
<STRONG><EM>Blank</EM></STRONG>.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV><STRONG>A.D.Tejpal</STRONG></DIV>
<DIV><STRONG>--------------</STRONG></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=nancy.lytle@auatac.com href="mailto:nancy.lytle@auatac.com">Nancy
Lytle</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">Accessd</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, September 24, 2003
14:53</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [AccessD] Removing a filter from
a report</DIV><BR>I know this should be simple but I have tried everything I
can think of....and it was pushed to the back burner and now it is on the hot
plate again so...<BR>The problem is I have a few reports, which users choose
from a form. This form allows the user to choose the report they want, the
year (one year, ie 2003 or all years) for the data, and the dept (either
one dept. ie EDP or all depts), then a click of a button and the report opens
for viewing with the selected records. But what seems to happen on
occassion is that a<BR>"filter" will stick to the report, thus making the next
selection not work.<BR><BR>I selected the reports using the good old stDocName
for the report and stLinkCriteria for the filter, ie
DoCmd.OpenReport<BR>stDocName,,,stLinkCriteria<BR><BR>On the close of each
report I use Me.filter = "" and Me.applyFilter = false<BR><BR>What am I doing
wrong?<BR>PS, I also have the same problem with forms when I want to open one
report<BR>based on criteria from another form.<BR><BR>TIA<BR><BR>Nancy
Lytle<BR><A
href="mailto:nancy.lytle@auatac.com">nancy.lytle@auatac.com</A><BR>202-314-1393<BR></BLOCKQUOTE></DIV></BODY></HTML>