
- #Basic form for openoffice base how to#
- #Basic form for openoffice base code#
- #Basic form for openoffice base windows#
#Basic form for openoffice base code#
The code presented has nothing to do with option (radio) buttons and there are numerous ways to do things such as retrieving/setting list box items. You original and edited question (please note edited sections when doing this) are very general in what is asked which is why the documentation was provided. Current versions found here → MRI releases and tutorial here → Introduction into object inspection with MRI and documentation here → MRI documentation Here are some links which will be of vital help:Īlso for a broader view look at Open Office Macros Explained by Andrew Pitonyak. Thank youĮxamining each (you have only a partial list thus far) is covered in documentation already. GetFromField("listbox-Coordinates","ListBox")Īs you can see it’s mostly a question of one line of syntax one needs to know.Ĭan I get some help please in getting the lines that need to be added to the subroutines in order to handle the other types of fields mentioned. If sTargetType = "Label" Or sTargetType = "Button" Then Sub GetFromField (sTargetName As String, sTargetType As String) PutToField("txt-BriefDescription","mynewtext","Text") If sTargetType = "Text" Or sTargetType = "Label" Then Sub PutToField (sTargetName As String, sTargetContent As String, sTargetType As String)
#Basic form for openoffice base how to#
However in spite of many alternative tests I haven’t figured out yet how to get content from option and radio-option fields. In the GetFromField subroutine, the code below works for fieldtype listbox, text, label, button-name and checkbox. However in spite of many alternative tests I haven’t figured out yet how to get content to a listbox, option or radio-option field. In the PutToField subroutine, the code below works for fieldtypes text, label, button-name and checkbox, I can even put Now() in the place of “mynewtext” and put a date. The coding to put or get a field’s value depends on the file type such as -text, label, listbox, checkbox, radio-option, image, button-name. I wish to make a sub-routine for getting a value from a field, and one for putting a value to a field. I use lots of macros in my forms to handle conditional situations, resulting in intervention in database tables via sql, or changing form field content or presentation (enable/visible or not).
#Basic form for openoffice base windows#
insert rows using the recordset of Form2Īlternatively, if it is required not to use bound controls, you could create Text Tables on the form ( Table -> Insert Table) and write macros to insert values into them.My environment: Windows 10, LibreOffice Version: 6.4.0.3 (圆4) HSQLDB Split Database.gather data from Form1 (based on Table1 or Query1 or whatever other data is involved).delete all records from the recordset of Form2 (which is Table2).Then a macro can populate the table control: As explained in the previous paragraph, create a separate toplevel form "Form2" to handle the table control, and set its recordset source to be Table2. To me, the obvious solution is to create a table "Table2" that will be used only for the table control. This allows data to be used in the same document that is not necessarily related to each other. Note that I am not talking about subforms or a different form document, but rather for example "Form1", "Form2" in the navigator.

You can create an UNO grid control in a dialog with code such as oGridModel.GridDataModel = oDataModel, but that will not work in a form.Ī Base form document can contain multiple independent forms by going to Form -> Form Navigator. It's possible to do columnNames = oGridTasksNotDone.ElementNames but that's about all. Unlike list or combo boxes, it seems that table controls that are unbound cannot have data.

Instead, the method gets the rowset of the form that contains the table control. The method getRowSet() is misleading, because the table control itself does not have a rowset. Let's start with some background information and then I'll offer a solution. Instead you will have to delete the new record. The new entry cannot be easily reversed.

Confirm the new data with the following command:.This is done using the updateXxx methods as shown in the previous section. For a new record there is a special method, comparable with changing to a new row in a table
