Ask Your Question

Trouble installing Access2base [closed]

asked 2016-11-20 23:27:39 +0200

EasyTrieve gravatar image

updated 2020-07-18 23:59:29 +0200

Alex Kemp gravatar image

I'm trying to install and learn to use the Access2base macro library. But I'm getting a fatal error message after installing. What am I missing?

Also could you help me understand how to read the error message given, as I think I'm likely to see other similar error messages. It reads in part, Argument nr. 1 [Value = '[EMPTY]'] is invalid.

I'm guessing that means Argument number 1 or the first argument of the function called. Not sure if it's talking about DBOpen or OpenDocument?. And it appears that the first function parameter is missing, which is invalid.

Installing: The Access2base install instructions are at the Access2base web site, and I would give you a specific page URL, but you can't use normal page URLs for their web site which appears to be JavaScript driven, and thus a non standard html interface.

  • To see the installation instructions click on Getting Started in the top of the left column. (BTW, if you click the wrong page, you can't backup normally. What you can do is scroll to the top of a page and close the unwanted yellow or brown tab which effectively backs you up to your last screen.)

  • Now scroll down to Start using the library.

The instructions there appear to be either unclear or incorrect. Here's what I did, and the error I am getting:

A) Create Access2base library to hold the sub they want installed:

image description A) 1of3

image description A) 2of3

image description A) 3of3

B) Install DBOpen as an OpenConnection event:

image description B) 1of2

image description B) 2of2

RESULT: Close and reopen gives a FATAL error

FATAL Error #1503 (Argument nr. 1 [Value = '[EMPTY]'] is invalid) occured in a call to function 'OpenConnection'

image description

LO on Debian Jessie

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-15 22:04:57.729597

4 Answers

Sort by » oldest newest most voted

answered 2016-11-20 23:50:20 +0200

Ratslinger gravatar image

updated 2016-11-21 01:51:10 +0200

There is nothing to install to use Access2Base as it comes with it. You do, however, need to load the library to use it. Usually the best example is a working document. Posted one today on this answer - click here.

Don't really use Access2Base as it is added overhead.

Edit: About your error - it appears it may be because you are using a name already in use. The Access2Base library is already under LibreOffice Macros & Dialogs.

edit flag offensive delete link more


Thanks the working document example helped me sort it out. The main problem turned out to be that I needed to be putting my open and close inside the HSQLDB test1.odb | Standard | <some name=""> (the specific database name that I was working on), not inside "My Macros | Standard". (Still not sure if "Access2Base" was overloaded. I'll try to update this if I figure that out.)

EasyTrieve gravatar imageEasyTrieve ( 2016-11-23 07:21:37 +0200 )edit

answered 2016-11-21 14:34:51 +0200

JPL gravatar image
  1. You should not install anything.
  2. Remove your Access2Base library from "My macros and Dialogs".
  3. Store the DBOpen routine in a module of the Standard library of the Base document. Otherwise the argument ThisDatabaseDocument in the call to OpenConnection() is empty, what is expressed in the error message.

BTW the Install age URL in the Access2Base documentation is (Right click on "Bookmark this link" and copy location at the bottom of any page).


edit flag offensive delete link more


It seems in the Basic editor dialog's left pane it's called, "My Macros & Dialogs", but in the Select Macro or Select Module dialogs it's called "My Macros".

EasyTrieve gravatar imageEasyTrieve ( 2016-11-24 00:00:24 +0200 )edit

It seems in the Basic editor dialog's left pane it's called, "My Macros & Dialogs", but in the Select Macro or Select Module dialogs it's called just "My Macros".

EasyTrieve gravatar imageEasyTrieve ( 2016-11-24 00:00:40 +0200 )edit

answered 2016-11-21 15:07:29 +0200

peterwt gravatar image

The Access2Base project was set up to help those with experience of VBA code in MS Access to make the transition to LO Base. The library emulates VBA commands in LO Basic.

The Access2Base Library is provided in versions of LO 4.2 and later. If you have installed the Assess2Base extension then remove it.

It states in the tutorial - Open in the main AOO/LibO Base window the ".odb" file (the database document) on which you would like to apply Access2Base functions. With Tools + Macros + Organize Macros + OpenOffice/LibreOffice Basic... open the Basic IDE and create a Basic module in the Standard library of the database document itself. The module should contain as a minimum next code:

Sub DBOpen(Optional poEvent As Object)
    If GlobalScope.BasicLibraries.hasByName("Access2Base") then
    End If
    Call Application.OpenConnection(ThisDatabaseDocument)
End Sub

So you should create the Module in your database file not in My Macros as you have.

Have you tried the excellent sample provided by @Ratslinger in your other posting.

It is probably a good idea to learn in the long term to program in the Basic provided by LO. It you look at the Access2Base Library you can see how VBA commands are translated into LO Basic.

edit flag offensive delete link more


I think I might have confused you a bit. Sorry. The "Access2Base" that I had referred to was where I had my open and close code. It was not the Access2Base library. I now see that this was a poor choice of names on my part. Once I moved the DBOpen and DBClose this fixed this issue. Thanks for the help.

EasyTrieve gravatar imageEasyTrieve ( 2016-11-23 07:27:26 +0200 )edit

@EasyTrieve - Just a comment - I prefer to use View is going to be closed in most cases because Document is going to be closed causes other problems in what I do.

Ratslinger gravatar imageRatslinger ( 2016-11-23 16:30:53 +0200 )edit

answered 2016-11-23 07:30:46 +0200

EasyTrieve gravatar image

updated 2016-11-23 08:10:41 +0200

To recap, put your DBOpen & DBClose in:

<your current database's library container name> / library / module`

as shown below, rather than in

My Macros (library container) / Standard (library) / <module name > (module)

image description

Also, I suspect that DBClose should be hooked to the

Document is going to be closed event


View is going to be closed

as is suggested in [the install instructions(, as shown below:

image description

edit flag offensive delete link more


@EasyTrieve It is probably not a good idea to name the Module created in the Standard Module of your document "Access2Base" as there could be a conflict with the the module containing the Access2Base routines. Just module1 is what I would use.

peterwt gravatar imagepeterwt ( 2016-11-24 00:07:35 +0200 )edit

Question Tools

1 follower


Asked: 2016-11-20 23:27:39 +0200

Seen: 408 times

Last updated: Nov 23 '16