Steve Schapel
miscellany at mvps.org
Tue Jul 10 14:35:15 CDT 2007
Philippe, I think it would be neater to use the Where Condition argument of the OpenReport method, rather than Filter. That way you would only need the one line of code, like this... DoCmd.OpenReport "BULLETIN", , , "COLL_ID=" & Me.cboSelColl Regards Steve philippe pons wrote: > Hi all, > > I tried to print a report, but unsuccessfully till now! > > I need to print the report but prior to this I set it'sFilter property: > Report_BULLETIN.Filter = "COLL_ID=" & Me.cboSelColl.Value > Report_BULLETIN.FilterOn = True > > I discover I have to open the report and then set the Filter and FilterOn > property. > All is ok, I can see my filtered report. > > Now I want to print it. > I user > DoCmd.OpenReport "BULLETIN", acViewPreview > Report_BULLETIN.Filter = "COLL_ID=" & Me.cboSelColl.Value > Report_BULLETIN.FilterOn = True > DoCmd.OpenReport sNomEtat, acViewNormal > > The report is printed with the correct number of records, but it remains > open in design view!! > > What is the correct way of doing that? > > Regards, Philippe