Drawpage Property or Method Not Found?


New to LibreOffice. Have programmed in VBA but am struggling with Basic. I’m sure there’s a simple answer to this but I havent been able to figure it out. I am trying to reference a field on a form that I have created in Base. The following code in my Sub gets hungup on ‘Drawpage’. The error I get is that Drawpage Property or Method Not Found. Is there a library or reference I need to have turned on?

Thanks in advance.

Dim oForm as Object

Dim oField as Object

oForm = ThisComponent.Drawpage.Forms.getByName(“frmAddMaterial”)

oField = oForm.getByName(“txtAddNew”)


Hard to be certain but either you are using the external form name (that name used on main .odb screen) or you are executing the routine from the Basic IDE.

Usually internal form names default to Form or MainForm.

Here is a link to the LO documentation → LibreOffice Base Handbook

many more important links in this answer → To learn LibreOffice Base are there introductions or tutorials?

and possibly this for an easier transition (already in LO Base) → Access2Base It’s about converting PEOPLE, not data

Where does one find the"internal form name"


Edit your form. On Form Design tool bar there is an icon for Form Navigator. Internal forms, controls and their names are there.

You are correct. I am using the form name as it appears on the main screen. I will read your links and see if I can get it going. Thanks for the quick response. Much appreciated.

Please only use answer to actually answer the original question. Otherwise use add a comment.