Ask Your Question

I am using Base. error message method or property not found

asked 2019-08-16 19:17:14 +0100

Sidecar gravatar image

I have two forms. The first form calls the second form where some data may be entered or changed. When finished it returns to form1 where I want the data refreshed. I have been working for days with no luck to get this to work. I am using a macro I copied from the online book.
This is the Macro

Sub Update

Dim oDoc As Object
Dim oDrawPage As Object
Dim osForm As Object

oForm = oDrawpage.forms.getByName("Instrument")


End Sub

End Sub I think I do not know how to make Reload() or Drawpage available to my program. I have worked for years with FoxPro but am new to Libera Office Base or any other SQL type database and am trying to expand my knowledge base. I would much appreciate your help. Thank You

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-08-16 19:58:38 +0100

Ratslinger gravatar image


First, if working with macros a good reference is needed. Here is the best single source: Open Office Macros Explained by Andrew Pitonyak -> OOME PDF.

As for your problem, you are accessing the Form object incorrectly. Depending on where the macro is called from, it should first obtain ThisComponent or ThisDatabaseDocument ( see my answer in this post -> ThisDatabaseDocument vs ThisComponent?).

With that you access Drawpage (not an object as you have), Forms and then the internal form. Careful using case. In many instances it is important.

With that, here is the statement you need to access oForm:

oForm = ThisComponent.Drawpage.Forms.getByName("Instrument")
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-08-16 19:17:14 +0100

Seen: 40 times

Last updated: Aug 16