Open table automatically after launching Base

Discuss the database features

Open table automatically after launching Base

Postby cyberhape » Thu Apr 23, 2009 8:33 pm

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
cyberhape
 
Posts: 3
Joined: Thu Apr 23, 2009 8:00 pm

Re: Open table automatically after launching Base

Postby QuazzieEvil » Sat Apr 25, 2009 6:15 pm

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).
Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551
OOo 2.3.X,3.1.* on Ms Windows XP + Ubuntu
QuazzieEvil
Volunteer
 
Posts: 282
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Open table automatically after launching Base

Postby Villeroy » Sat Apr 25, 2009 6:33 pm

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 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17297
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Open table automatically after launching Base

Postby johhanus » Sun Aug 11, 2013 4:46 pm

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
johhanus
 
Posts: 4
Joined: Sun Aug 11, 2013 4:39 pm

Re: Open table automatically after launching Base

Postby DACM » Sun Aug 11, 2013 7:17 pm

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.0.x; LO 4.1.x; Windows 7 64-bit
Wizard: Automated 'split' HSQL database template; Warning: Avoid embedded databases
Soli Deo gloria
User avatar
DACM
Volunteer
 
Posts: 1069
Joined: Tue Nov 03, 2009 7:24 am


Return to Base

Who is online

Users browsing this forum: No registered users and 7 guests