Hello friends. Happy New Year to you all.
In 2025 I had a problem that I couldn’t solve: Considering that I have two databases (LibreOffice), is it possible to open a form in “bd1.odb” that is located in “bd2.odb”? Thank you.
At first by direct wording: No it is not possible “to open a form IN “bd1.odb” that is located IN “bd2.odb”?”, just because the form is not “in “bd1.odb””
.
The question is: What is your goal?
- You could open bd2.odb and your desired form by macro. (Not “in” but “from” bd1)
- You could save the form as independent form (Writer document) and open this.
- If your idea is to use the “foreign form” from bd2 with data from bd1 you need a copy of the form in bd1 and connected to bd1 instead of bd2 (or some sophisticated code to change connection on the fly).
You can create form/subform hierarchies in stand-alone documents (not embedded in Base documents). Each form/subform can be linked to another database.
Okay, here’s the situation:
“bd1.odb” is the database where I record and manage all my editorial writing work: interventions, analyses, commentaries, etc.
“bd2.odb” is another database where I have notes on: countries, rulers, political parties, political figures, etc.
I also have other “.odb” files where I have: companies, entrepreneurs, stock market quotes, etc.; films, actors, directors, etc.; books, authors, etc. – each with a defined purpose.
My goal is to be able to access all the information I have in “bd2” on a given subject while continuing to write in “bd1,” without having to stop everything and break my train of thought.
Currently, I work with two monitors and have both databases opened simultaneously, and I can query “bd2” while working in “bd1.” It works well, no problem! What more could I want? Well, probably the impossible!
I would like to have a text field and an action button in “db1” that would allow me to enter text (for example: “Venezuela”, “Maduro”, “Trump”, “Putin”, etc.) and search all the information I have in “db2” about the entered text.
This wouldn’t be difficult if I had all the information in a single database, but it would become gigantic. That’s why I have information in several databases, each one with its own purpose, because my work isn’t just about international politics.
Therefore, what I intended to do, according to what you’re saying, is impossible.
Thank you for your reply.
Well, that’s very interesting. Can you be more specific?
I may have a form in “bd1” where I write my articles, which has a subform with a text box where I write the text to be searched for, and an action button that searches for the text, in “bd2”? Is that it?
If so, how do I link it to “bd2”?
But that’s the purpose of databases: To handle gigantic amounts of data, so I would just use MariaDB for this.
There is an unusual possibility for a special database: sqlite has an ATTACH-command, where you can make a second sqlite-database available in the “first”. This could be used for your idea of “several databases, each one with its own purpose,”.
.
I have used the feature in scripts, but have not tried to bind abform to this…
“Simple” database engines such as HSQL, Firebird, SQLite, even dBase can deal with many millions of records. You must not use any databases embedded in Base documents.
- Extract the zip.
- Register the database document as “Spreadsheet”. It is linked to the spreadsheet.
- The second database is already registered as “Bibliography”, unless you removed that sample db from your installation.
- Open the Writer document having a form and a subform. Left side comes from the spreadsheet, right side shows the corresponding entries of Bibliography.biblio.
Calc-Biblio-Link.zip (49.5 KB)
Thank you very much Villeroy for your attempt to help me, but it only proves that Wanderer is right, that is: It is not possible to connect two LO databases. I also didn’t find the second database “Bibliography” in your .zip file. And since this change doesn’t solve my problem, I will continue working with both databases open simultaneously. Thank You.
Bibliography is the database, available in every install of LibreOffice by default, so you already had this database. (In fact it is a dBase-file) - and Villeroy had explained this above.
You have that already. “Bibliography” is shipped with LibreOffice.
Can’t really grasp your point 
The example is an exact analog of, say connecting to 2 DBs using MySQL/MariaDB.
As I can remember now, you do it like:
SELECT db1.editorial_work.[...], bd2.informations.[...]
You don’t even tell us which software you are using.
?? Seems to be LibreOffice so HSQLDB or Firebird:
The “Problem” arises, because he uses “full” databases, where others would just use tables:
So he needs/hopes for a solution of a self-created problem.
IMHO a waste of time…