Hilfe für LibreOffice 7.4
Access2Base is a LibreOffice BASIC library of macros for (business or personal) application developers and advanced users. It is one of the libraries stored in "Application macros and dialogs".
The functionalities provided by the implemented macros are all directly inspired by Microsoft Access. The macros are callable mainly from a LibreOffice Base application, but also from any LibreOffice document (Writer, Calc, ...) where access to data stored in a database makes sense.
Die API, die durch Access2Base bereitgestellt wird, ist dafür gedacht, kompakter, intuitiver und einfacher erlernbar zu sein als die Standard UNO-API (API = Application Programming Interface; zu deutsch Anwendungsprogrammierschnittstelle).
Die Bibliothek ist Online dokumentiert auf http://www.access2base.com (englisch).
Eine vereinfachte und erweiterbare API für die Manipulation von Formularen, Dialogen und Steuerelementen, ähnlich dem Microsoft Access-Objektmodell,
eine API für den Datenbankzugriff auf die Objekte Tabelle, Abfrage, Datensatz und Feld,
eine Anzahl an Aktionen mit einer Syntax, die ihren Microsoft Access-Makros/Aktionen entsprechen,
die Datenbankfunktionen DLookup, DSum …,
die Unterstützung der Kurzschreibweise wie Forms!myForm!myControl
und zusätzlich
ein konsequentes Fehler- und Ausnahmesteuerungsprogramm,
Möglichkeiten, Ereignisse für Formulare, Dialoge und Steuerelemente zu programmieren und
Unterstützung sowohl für eingebettete als auch für eigenständige (Writer-)Formulare.
REM Open a form ...
OpenForm("myForm")
REM Move a form to new left-top coordinates ...
Dim ofForm As Object ' In VBA => Dim ofForm As Form
Set ofForm = Forms("myForm")
ofForm.Move(100, 200)
REM Get the value of a control ...
Dim ocControl As Object
ocControl = ofForm.Controls("myControl")
MsgBox ocControl.Value
REM Hide a control ...
ocControl.Visible = False
REM ... or alternatively ...
setValue("Forms!myForm!myControl.Visible", False) ' Shortcut notation
' In VBA => Forms!myForm!myControl.Visible = False