I have created a simple movie history database, three tables and two forms. (Libreoffice Version 7.1.4.2)(Mac OS Mojave 10.14.6) Database name is BWR copy.odb Each form consists of a table with common information: title, genre, year produced, etc. The other two forms are information concerning the theaters where they exhibited and written articles on the film. So far, so good. I would like to be able to add a push button to toggle back and forth between the two forms. I have two problems. First, I wanted to add a push button and then write a macro. But even using the form wizard, I can’t add anything. I push, say, radio button, I get the little plus sign and the tiny square and drag it into the form. When I let go, the cursor moves up to the top left corner of the form. And now, somehow, I don’t even have the push button on the tool bar (it remains in the drop down menu). Second, and please forgive for this, I’m not sure how to write the macro. I found the previous Q&A which showed this one.
Sub openFormByTag(oEv)
cWhat = com.sun.star.sdb.application.DatabaseObject.FORM
oModel = oEv.Source.getModel()
sName = oModel.Tag
oView = oModel.Parent.Parent.Parent.Parent.getCurrentController()
oView.loadComponent(cWhat, sName, FALSE)
End Sub
But I can’t figure out what to do. I figured I should add the name of the form somewhere. When I sub in the form name in place of DatabaseObject, I get a message saying “theater” or “article” can’t be found. Believe it or not, I know how to do this once, in Access. But I’m lost here. Can anyone help?