Hello Mr. Robert,
Thank you for your reply. However, I assume that the problem is not with the LO version. As I said, the Tables continue without any problems and, if I create a new Form, it behaves perfectly as if there were no problem with the file, although I still cannot open the other forms.
I assume the problem occurred when I closed the file.
In my base LO “Filmes.odb” I have a macro that saves and closes the file and, as I always do after any use, I press the button that runs that macro. When I opened the file again, the “frmMenu” form no longer opened, nor any other form.
Therefore, everything leads me to believe that the problem occurred when I ran the macro “SaveAndClose”. Something must have happened before the macro finished running, without me noticing. For example, reopening the same file or another .odb file.
Sub SaveAndClose
Dim dispatcher
Dim oForm As Object
Dim oDocument As Object
Dim oParent As Object
oForm = ThisComponent.DrawPage.getForms().getByName(“MainForm”)
If oForm.IsModified then
MsgBox “Please save or clear record first”
Exit Sub
End If
oDocument = ThisComponent.Parent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Value = 0
dispatcher.executeDispatch(oDocument, “.uno:Save”, “”, 0, args1())
oParent = ThisComponent.getParent()
oParent.close(true)
End Sub
In the corrupted file, the problem only affected the Forms and Reports. Tables and Queries remained accessible and intact. Therefore, the “solution” to my problem was resolved with the help of a backup copy, from which I copied all the Forms and Reports to the corrupted version. However, it would be good if I understood what I did wrong that triggered the “malfunction”.
Best regards,
Quaresma