Most of my Base related macros are triggered by a form event or by a form control event.
Two entry points for script events bound to forms or form controls respectively:
Code: Select all
def Control_Action(ev):
ctrl = ev.Source
frm = ev.Source.Model.Parent
subform = frm.getByName("MySubform")
def Form_Action(ev):
frm = ev.Source
ctrl = frm.getByName("MyButton")
subform = frm.getByName("MySubform")
This branch of the API is the most complicated of the whole office suite and the API of this office suite is a nightmare. You can not really do anything without certain extensions.
MRI:
viewtopic.php?f=74&t=49294
APSO:
https://extensions.libreoffice.org/en/e ... for-python
Most request for macros on this forum are pointless. Before you even think of any macros, you should become very familiar with the application itself.
Base tutorial:
http://user.services.openoffice.org/en/ ... 74#p201074
Complex database (embedded HSQL) with no macro:
viewtopic.php?f=100&t=70259
More tutorials and examples on this forum:
viewforum.php?f=83
The Base component is a tiny addition to this office suite. Base itself is not a database development sute within this office suite. It is far, far behind MS Access.