Access2Base

8 0

VBA for MSAccess emulator

Project Description

Access2Base is a standard feature of LibreOffice. The 1.6.0 version (= current version) is pre-installed in LibreOffice 5.3.

Download it only if your LibreOffice version is <= 5.2.

This extension implements a LibO/AOO Basic library for Base applications.


The API is entirely inspired by VBA for MSAccess and its object model.

As such it is a tool helping people to migrate their Access databases to Base OR to write their first macros.
It is much more intuitive and easy to learn than the standard UNO API. It is documented (online) in detail.

Version 1.6.0 was uploaded to this site on 18-Feb-2017.

The implemented macros include (among a huge list of functionalities):

  1. forms, dialogs and controls manipulations derived from the MSAccess object model
  2. an API for database access with the table, query, recordset and field objects
  3. actions with a syntax identical to their corresponding MSAccess macros/actions
  4. the DLookup, DSum, ... database functions
  5. the support of the shortcut notations like Forms!myForm!myControl
  6. a consistent errors and exceptions handler
  7. facilities for management of form and control events

The macros using the API may be stored both in Database documents (".odb" files) and in standalone (Writer/Calc/...) forms.

It is even possible to access data from Calc cell formulas.

ONLINE DOCUMENTATION HERE ...

DOWNLOADABLE EXAMPLES HERE ...

Compare Access2Base with MSAccess VBA

LibreOffice Base with Access2Base

REM Open a form ...

DoCmd.OpenForm("myForm")

REM Move a form to new left-top coordinates ...

Dim ofForm As Object
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

Category/Categories

Macro, Base Extension

Homepage of the Project

http://www.access2base.com/access2base.html

Logo

Current Release

Access2Base - 1.6.0

Released Feb 18, 2017 — tested with:

LibreOffice 4.0, LibreOffice 4.1, LibreOffice 4.2, LibreOffice 4.3, LibreOffice 4.4, LibreOffice 5.0, LibreOffice 5.1, LibreOffice 5.2,

The CopyObject action may copy tables (structure and data) from one database to another. As an experimental feature involved tables may even reside in different database systems. The database class has received new properties: Name, Connect and Version. Additionally, a spanish translation is provided (thanks to Iñigo Zuluaga).
More about this release…

Access2Base.oxt
All platforms
File size: 995 kb

All Releases

Version

Released

Platform(s)

Compatibility

Description

License(s)

Status

1.6.0

Feb 18, 2017
  • All platforms
  • LibreOffice 4.0
  • LibreOffice 4.1
  • LibreOffice 4.2
  • LibreOffice 4.3
  • LibreOffice 4.4
  • LibreOffice 5.0
  • LibreOffice 5.1
  • LibreOffice 5.2
The CopyObject action may copy tables (structure and data) from one database to another. As an experimental feature involved tables may even reside in different database systems. The database class has received new properties: Name, Connect and Version. Additionally, a spanish translation is provided (thanks to Iñigo Zuluaga).
  • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
  • MPL-v2.0+ (Mozilla Public License Version 2.0 or later)
final

1.5.0

Aug 04, 2016
    • LibreOffice 4.1
    • LibreOffice 4.2
    • LibreOffice 4.3
    • LibreOffice 4.4
    • LibreOffice 5.0
    • LibreOffice 5.1
    More complete management of (long) binary fields in databases with the addition of the GetChunk and AppendChunk methods to the field object.<br /> Addition of the Picture property for ImageControl controls.
    • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
    • MPL-v1.1 (Mozilla Public License Version 1.1)
    final

    1.4.0

    Jan 17, 2016
      • LibreOffice 4.1
      • LibreOffice 4.2
      • LibreOffice 4.3
      • LibreOffice 4.4
      • LibreOffice 5.0
      The OutputTo action has been significantly enhanced. Output in one single Basic statement the content of a table or of a SELECT query into - an html file. The data table can be embedded in a template file wontaining styling options - a Calc spreadsheet - a text/csv file
      • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
      • MPL-v1.1 (Mozilla Public License Version 1.1)
      final

      1.3.0

      Aug 29, 2015
        • LibreOffice 4.0
        • LibreOffice 4.1
        • LibreOffice 4.2
        • LibreOffice 4.3
        • LibreOffice 4.4
        • LibreOffice 5.0
        New CommandBars collection of CommandBar objects: Easily show/hide menu bar, status bar, toolbars and toolbar elements.
        • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
        • MPL-v1.1 (Mozilla Public License Version 1.1)
        final

        1.2.0

        Feb 08, 2015
          • LibreOffice 4.1
          • LibreOffice 4.2
          • LibreOffice 4.3
          • LibreOffice 4.4
          All the methods which can be used without a database connection (error handling, dialogs manipulations, status bar and window handling, commands launch, ...) are usable as such even from non-Base applications. To pass values from one open document to another, use the TempVars collection of TempVar objects. New properties for forms and subforms: OrderBy and OrderByOn. The new ApplyFilter and SetOrderBy actions are applicable on table or query datasheets, and on forms or subforms as well. Also the GoToRecord action has been extended to table and query datasheets.
          • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
          • MPL-v1.1 (Mozilla Public License Version 1.1)
          final

          1.1.0

          Aug 01, 2014
            • LibreOffice 3.6
            • LibreOffice 4.0
            • LibreOffice 4.1
            • LibreOffice 4.2
            • LibreOffice 4.3
            The 1.1.0 version allows dynamic data access from any Basic macro, including, just as an example, from a user-defined function invoked in a Calc cell formula.
            • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
            • MPL-v1.1 (Mozilla Public License Version 1.1)
            final

            1.0.0

            Dec 14, 2013
              • LibreOffice 3.3
              • LibreOffice 3.4
              • LibreOffice 3.5
              • LibreOffice 3.6
              • LibreOffice 4.0
              • LibreOffice 4.1
              Inclusion of Access2Base code into the LibreOffice 4.2 build. Code stabilisation, robustness improvements (naming collisions risks, error handler, ...) Toggle sidebar in RunCommand Alignment of code with LibreOffice 4.2 new internal format for Time fields (compatibility with OpenOffice and older versions is ensured).
              • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
              • MPL-v1.1 (Mozilla Public License Version 1.1)
              final

              0.9.5

              Aug 30, 2013
                • LibreOffice 3.6
                • LibreOffice 4.0
                • LibreOffice 4.1
                Framework for database access: TableDefs, QueryDefs, Recordsets and Fields collections. TableDef, QueryDef, Recordset and Field objects. Addition of the CurrentRecord and Recordset properties for forms and subforms. Introspection improved with the Item property for Collections. RunSQL and OpenSQL support pass-through mode of operation.
                • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                release-candidate

                0.9.1

                  • LibreOffice 3.6
                  • LibreOffice 4.0
                  Bug fixing. Performance improvement when processing very large (1000+ items) listboxes. Workaround implemented to survive the LibreOffice 4.0 bug described in BugZilla (https://www.libreoffice.org/bugzilla/show_bug.cgi?id=60752) Finalization of the Application object. Implementation of the SysCmd method for the management of the status bars. Redocumentation of the object model. Addition of the Dialog object. The Format property may be set programmatically for date and time controls. Addition of the OpenSQL action.
                  • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                  beta

                  0.9.0

                    • LibreOffice 3.3
                    • LibreOffice 3.4
                    • LibreOffice 3.5
                    • LibreOffice 3.6
                    Complete internal redesign of code to allow more object-oriented syntaxes for property settings and method invocations. E.g. form.height = 100 form.move(100,200) Old syntax still supported. Consolidation of the object model with the Parent, Source and ObjectType properties. Addition of a Close method to the Form object. Several bugs corrections.
                    • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                    beta

                    0.8.9

                      • LibreOffice 3.3
                      • LibreOffice 3.4
                      • LibreOffice 3.5
                      Localization: - of the 2 dialogs forms - of all strings (mainly error messages) used in the API A french translation is provided. For other languages, contributions are welcome.
                      • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                      beta

                      0.8.6

                        • LibreOffice 3.3
                        • LibreOffice 3.4
                        • LibreOffice 3.5
                        Maintenance release
                        • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                        beta

                        0.8.5

                          • LibreOffice 3.3
                          • LibreOffice 3.4
                          • LibreOffice 3.5
                          Introduction of new commands: OutputTo for storing a form document as a PDF, DOC, ... file. SendObject to send a form after transformation to PDF, DOC, ... by mail. RunApp to start an external application.
                          • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                          beta

                          0.8.2

                            • LibreOffice 3.3
                            • LibreOffice 3.4
                            • LibreOffice 3.5
                            API implementation identical to 0.8.1. "Check for Updates ..." functionality now detects Access2Base new versions.
                            • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                            beta

                            0.8.1

                              • LibreOffice 3.3
                              • LibreOffice 3.4
                              • LibreOffice 3.5
                              Bug fixing in the setValue method.
                              • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                              beta

                              0.8.0

                                • LibreOffice 3.3
                                • LibreOffice 3.4
                                • LibreOffice 3.5
                                Full support of standalone (Writer) forms.
                                • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                beta

                                0.7.5

                                  • LibreOffice 3.3
                                  • LibreOffice 3.4
                                  • LibreOffice 3.5
                                  Support of Listboxes with a separate column for bound fields. Introduction of the Bookmark property of Form pseudo-objects. New actions: ShowAllRecords and GoToControl. New methods for managing Listboxes content (with the ValueList rowsource type): AddItem and RemoveItem. The RunSQL command accepts square brackets to surround field or table names.
                                  • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                  beta

                                  0.7.1

                                    • LibreOffice 3.3
                                    • LibreOffice 3.4
                                    • LibreOffice 3.5
                                    Correction of URL of online help. Clickable from Help menu in the Basic IDE.
                                    • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                    beta

                                    0.7.0

                                      • LibreOffice 3.3
                                      • LibreOffice 3.4
                                      • LibreOffice 3.5
                                      Bugs fixing in the SelectObject action (abort when help file open). Extension of the scope of the SelectObject action. Introduction of the RunCommand action. Documentation updated.
                                      • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                      • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                      beta

                                      0.6.0

                                        • LibreOffice 3.3
                                        • LibreOffice 3.4
                                        • LibreOffice 3.5
                                        New actions: Maximize, Minimize, etc.
                                        • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                        beta

                                        0.5.1

                                          • LibreOffice 3.3
                                          • LibreOffice 3.4
                                          Minor changes vs. version 0.5.0
                                          • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                          beta

                                          0.5.0

                                            • LibreOffice 3.3
                                            • LibreOffice 3.4
                                            First public release
                                            • LGPL-v3+ (GNU Lesser General Public License Version 3 and later)
                                            beta

                                            Legal Disclaimer and Limitations for Downloads

                                            The Document Foundation has not reviewed, and cannot review, all of the material, including computer software, available on or by means of The Document Foundation's
                                            websites, and cannot therefore be responsible for that material's content, use or effects. By operating its websites, The Document Foundation does not represent or imply that it endorses the material there available, or that it believes such material to be accurate, useful or nonharmful. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses and other harmful or destructive content. The Document Foundation's websites may contain content that is offensive, indecent or otherwise objectionable, as well as content containing technical inaccuracies, typographical mistakes and other errors. The Document Foundation's websites may also contain material that violates the privacy or publicity rights, or infringes the proprietary rights, of third parties, or the downloading, copying or use of which is subject to additional terms and conditions, stated or unstated. The Document Foundation disclaims any responsibility for any harm resulting from the use by The Document Foundation's visitors of The Document Foundation's websites, or from any downloading by those visitors of content available on or by means of The Document Foundation's websites.

                                            Changes

                                            Content contained on The Document Foundation's websites, including these Legal Disclaimers and Limitations, may be changed at the sole discretion of The Document Foundation and without notice. You are bound by any such updates or changes, and so should periodically review these Legal Disclaimers and Limitations.

                                            If you believe any file is present on the site contrary to any TDF rule or applicable law, please supply full details to info@documentfoundation.org for impartial consideration.