Access2Base - to open a Report

Hi.
First time trying Access2Base Library…
 
In biblio.odb I made a “Report2” that works fine.
Via Button in a Form I’m trying to open it (next step will be filter via ListBox parameter).

  • DoCmd results in Error
    Access2Base_Error
  • Via “standard” LO’s Basic way it opens up :ok:
Option Explicit
Sub OpenReport2(Evt As Object)
    GlobalScope.BasicLibraries.loadLibrary("Access2Base")
    GlobalScope.BasicLibraries.loadLibrary("MRILib")
    Dim Rpt As Object
    On Error GoTo Erro
    DoCmd.OpenReport("Report2")
    'ThisDatabaseDocument.ReportDocuments.getByName("Report2").open
    'MRI Rpt
    Exit Sub
    Erro: MsgBox "ERRO " & Err & Chr(10) & "na linha " & Erl
End Sub

What I’m missing?
I guess it may be because of the Event Source: DoCmd does not identify the Form and it’s connection :thinking:
But anyway: how to implement it?
For DoCmd one must set up an explicit connection in the script?
Thanks in advance.

Without Access2Base:
BiblioForm.odt (11.0 KB)

The button belongs to a form connected to the “biblio” table.
The name of the report to be opened is stored in the push button’s property “Additional info”.
I added a report “Report1” to my “Bibliography” database.