[Solved] Re: [libreoffice-users] Setting Base to open with a slected form

The solution to getting LibreBase to open with a particular form involves several steps:
1. Create a macro
/Sub Menu_Main( )
Dim ObjTypeWhat
Dim ObjName As String
ObjTypeWhat = com.sun.star.sdb.application.DatabaseObject.FORM
ObjName = "MainMenuForm" 'The name of the form you want to open at Base start-up, this needs to exist.
If ThisDatabaseDocument.FormDocuments.hasbyname(ObjName) Then 'Check the form exists
ThisDataBaseDocument.CurrentController.Connect() 'If the form exists connect to the database
ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, ObjName, FALSE) 'Open the form
Else
MsgBox "This is embarrassing, sorry, can't find the requested form to open!"+chr(10)+"Form Name = " & ObjName + chr(10)+"Check the details." , 48, "DS4A SBM encountered a problem!"
End if
End Sub/
2. Call the macro when the data base is opened:
From the top tool bar select: Tools>customise>opendocument
Add macro Main_menu to this selection.

When the data base is opened there is a delay of about 1 second before the form named in the macro opens.
This isn't quite as fast as Access, but in many other areas I found LibreBase to be more intuitive and than MS Access. I was able to convert my data bases from Access to LibreBase with all of the functionality the original Access databases, including reports, and in some cases with improved functionality.

Regards

Peter Goggin