Hi Edgar,
All you really need is one line:
DoCmd.OpenReport "Report_Volume", acViewPreview, Criteria
or
Dim strReportName as String
strReportName = "Report_Volume"
DoCmd.OpenReport strReportName, acViewPreview, Criteria
The way you are doing it works, but it takes more lines and is a round about
way.
HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
"Edgar" wrote:
> I found the problem
> DoCmd.OpenReport MyReport.Name, acViewPreview, Criteria
> that's the rigth string.
>
> I'm sorry for the space
> --
> Edgar Rey
>
>
> "Edgar" wrote:
>
> > Hi Everyone,
> > I got this problem:
> >
> > Public MyReport as Report
> > set MyReport = Report_Volume
> >
> > and Now,
> > DoCmd.OpenReport MyReport, acViewPreview, Criteria
> > But It doesn't show anything.
> > I added -- MyReport.Visible = true -- and then it shows the report
> > Without
> > any Filtering. It Shows the report in he original State Exactly as
> > Report_Volume looks like.
> > I Think MyReport.Visible = true is giving me a trouble opening the
> > source report (Report_Volume). What I need is to know Why MyReport doesn't
> > show up with the Docmd order.
> >
> > Please, help is required for half a Day of no resolutions
> >
> > Thanks a lot for your considerations.
> >
> >
> > --
> > Edgar Rey
|