How to I create a Base application that will start-up on a switchboard form?

I would like to distribute to several people the Base application I have created. For their ease of use, I want the application to start-up on a switchboard screen, Main, with a minimized primary Base window. Solutions I have seen call for a modification of My Macros which is not easily distributable or relinking all the switchboard buttons once the application is on each machine. Some of my users are Mac users and some are PC users, so system calls are not acceptable. I tried putting a macro that opens the Main screen in the Open Document Event for the database, but it hangs up and locks the system until it is terminated by an OS command.

Anyone know of a solution that is confined to the database itself?

Thanks, David

Create a Library in the database document to contain all the Macros you want to use in the database. Then when you distribute the database all users will have the macros in the same place independent of the machines in use.

Open the database. Then Tools > Macros > Organise Macros > LibreOffice Basic. Click on the database name and select New button. Accept Module1. Put your Macros there.

I have successfully used the macro in Doug’s answer on this post.. With minor mods, have this working from the documents macros. Base briefly appears, then becomes hidden with the established form then appearing.

As an aside, macros (for My Macros as example) can easily be distributed via extension (.otx) files and are very easy to install by the user.

If so desired, you can also password protect your macros.

Everything depends upon your needs and how much effort you are willing to expend.

Edit 7/5/2017:

As stated above, the macro from Dougs’ post needs mods. Here are two examples both using the sample on the DocFoundation link you provided.

Sample 1: FR.FAQ.BASE_137_OuvrirForm.odb

This is exactly as from the link. When you open the .odb the main Base screen opens and then the form Instruments opens. Both the main screen and original form remain visible.

Sample 2: FR.FAQ.BASE_137_OuvrirForm_2.odb

This is a modified version of Sample 1. Please note the instructions I present here. VERY IMPORTANT!

When you open Sample 2, the main Base form appears briefly, the form Instruments opens and the main Base form disappears (actually hidden from sight). IMPORTANT! If you just close the form, the .odb is still active in memory! To Exit properly, use Ctrl & Q keys OR from Instruments menu select File->Exit LibreOffice.

Have no reason to believe either of these won’t work on Mac.

I appreciate all the responses to my question. I am using LO 5.2.7 on Mac Sierra and none of the answers work. I believe it is related to the interaction between LO and the OS and I have given up on this approach. I may try the LO 5.3 version, but I think it may be a bug.
Thanks, David

Find it hard to believe none worked. With Doug’s you need to make mods. But other methods should work. Would a working sample help or have you really given up on this?

I used the example database the code from Doug’s post in a MyMacro routine pointing to the form in the sample database at: Faq/Base/137/fr - The Document Foundation Wiki .

If anyone had a working example from LO 5.2.7 on a Mac, otherwise, I am tending to give up. It is frustrating to have code work smoothly on a PC that doesn’t work on a Mac and then other situations where it works fine on a Mac but not on a Windows 10 PC with LO 5.2.7 (Copy to clipboard https://www.prahladyeri.com/blog/

Thanks for your efforts. Sample 1 just opens to the main base form but I can’t open the Instruments form. Sample 2 is more interesting in that it opens to a greyed form called Test Base with a white box that shows the “Create form. . .” and "Use Wizard section of the main base form. After ten minutes I Force Quit and recover a main base form that I can’t edit the Instruments form. I think that’s enough effort for both of us!