I've never written any code in VBA so I can't be of much help to you there.
My understanding is the while on the surface Access and Base are similar, under the hood they are quite different.
I primarily use the MRI extension which is an object inspection tool that can be quite helpful in locating objects, properties, methods, interfaces and services. Here is a link to a tutorial that can get you started
viewtopic.php?f=74&t=49294
The Xray tool has similar capabilities and can be downloaded from
http://berma.pagesperso-orange.fr/index2.html
Andrew Pitonyak has a book “OpenOffice.org Macros Explained” and some other documents including “OpenOffice.org Base Macro Programming” that can be downloaded from
http://www.pitonyak.org/oo.php
Another resource that I have found helpful is a book by Roberto Benitez “Database Programming with OpenOffice.org Base & Basic” . This book is available for purchase.
http://www.baseprogramming.com/
http://www.baseprogramming.com/resources.html
What confused me is the object model showing a form has Control(...), which I interpreted as a collection.
The object oForm can have elements, which can be controls or other forms. If you open your form in the design mode and select the Form Navigator from the Form Design Toolbar (usually found near the bottom left of the window) you can see a visual representation of the form structure. You can also use that to adjust control properties and how data is loaded and linked in the forms.
Also, what is the correct way of getting the current database as an object? access2base says to use Application.CurrentDb, or just CurrentDb, but they return the null object.
You can get there using an Event on the form or from ThisComponent. Using ThisComponent is can be tricky though. It is wise to assign it using something like
early in your macro. ThisComponent returns the currently active window, which can change during the lifetime of the macro, especially if you are using the IDE, MRI or XrayTool.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11