"news.onet.pl" wrote
I have a question concerning to open the reports.
I know that DoCmd.OpenReport is a obsolete
form of opening the reports,
Where did you get the mistaken idea that DoCmd.OpenReport is an "obsolete
form" of opening reports?
but how to implement opening reports in
VB using another VB code?
You use the term "VB", but I am assuming you actually mean Access' VBA
because there's no "DoCmd..." in the separate VB or VB.NET products.
Reports and Formsare objects object. You can Dim an object variable as that
object, eg.
Dim rptCopy as rptYourDefinedReport
and then Create a new instance. The only advantage I can see to this is if
you want to have multiple copies of the same Form open at once. My personal
opinion of multiple copies of the same form being open at once is that it
makes it very easy to create a confusing user interface and should be done
rarely, if ever.
Larry Linson
Microsoft Access MVP