LibreOffice 7.4 Hjelp
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.
API-en som kjem med Access2Base er meir konsise, intuitive og lettare å læra enn dei vanlege UNO API-ane. (API = Application Programming Interface eller applikasjonsprogrammeringsgrensesnitt på norsk).
Biblioteket er dokumentert på http://www.access2base.com
ein enkel API som kan utvidast for skjema, dialogvindauge og kontrollelement på same måten som med objektmodellen Microsoft Access.
ein API for databasetilgang med objekta tabell, spørjing, postar og felt
ei rad med handlingar som har ein syntaks identisk med dei tilsvarande Microsoft Access-makroane/-handlingane
databasefunksjonane DLookup, DSum, …
støtte for snarvegnotasjon som Forms!myForm!myControl.
i tillegg
ein konsistens feil- og unntakshandsamar,
høve til å programmera skjema, dialogar og å kontrollera handlingar og
støtte for både innebygde og sjølvstendige (Writer) skjema
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