Open table automatically after launching Base

Discuss the database features
Post Reply
cyberhape
Posts: 3
Joined: Thu Apr 23, 2009 8:00 pm

Open table automatically after launching Base

Post by cyberhape »

Hello,
I'm a newbie here in the OpenOffice community ;)

I'm working with Ubuntu 8.10. :D
I migrated my data from MS Office to OpenOffice 3.0.1.
Now I'm missing a little feature from MS-Access. When I start MS-Access I could run a script/macro called "autoexec" which automatically opens a form or table.

So my questions is : Is there any possibility to do this also in OpenOffice Base ? :?: At the moment I have to start Base and then double click on the table to open it.

Any help would be nice. :idea:
Thanks a lot

Peter
OOo 3.0.X on Ubuntu 8.x + Mac OSx
QuazzieEvil
Volunteer
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Open table automatically after launching Base

Post by QuazzieEvil »

hmm, thought I had answered this question already. Try the BaseTools extension. May not work out of the box (still working on it). But, there is some basic code that may help you. Look at the BaseLoader sub in the Utils Module. Bind this sub to the Open Document event of OOo. You can remove/comment lines that set event listeners. add line to open table--use RunCmd.OpenTable (i think that is what it is called).
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Open table automatically after launching Base

Post by Villeroy »

Alternatively you can create a form, which is a Writer document with an abstract container of forms and form controls.
Save the Writer document somewhere in your file hierarchy.
Open the document, get toolbar "Form Design", turn on design mode (button #2), get the form properties (button #4), tab "Data".
Reconnect the form with the database document (push the tiny [...] button near "Data source" or select it by registered name).
Turn off design mode. If the form works OK, store and close the form and withdraw write access from the form document ( chmod -w ~/myForm.odt ).
Now this form will load in working mode rather than edit mode. Add a desktop link if you like.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
johhanus
Posts: 4
Joined: Sun Aug 11, 2013 4:39 pm

Re: Open table automatically after launching Base

Post by johhanus »

Dear,

some time go away, so may be, that thing is possible now?
(I mean possibility to simply-make some simple-autoexecmacro, as simple as openning one table on startup of the .odb file)

thank you very much in advance...
john
LibreOffice 4.1.0.4 on w2k
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Open table automatically after launching Base

Post by DACM »

As Villeroy mentions here and in your previous post on this subject, it's possible to view and optionally interact with a table or SQL query using a Table Control added to a standalone Writer or Calc Form document, which can be opened directly from the desktop using a mouse click.
stockdatabase.jpg
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Post Reply