These last few weeks LO 7.3.7.2 has been erratic at saving new records I have entered into a form. Sometimes it does but more often it doen’t, and I have to re enter the record /information again. I always make sure I save the form and also the database file. The new record is in the table, but not the query, and when I enter the record again, it is duplicated in the table!
Can anyone help here please.
Refresh the (sub-)form that should display the newly added data.
I can offer a simple macro doing this automatically for you: Apache OpenOffice Community Forum - [Base, Python] Tiny Macro Refreshing Forms, List/Combo Boxes - (View topic)
- Install the macro.
- Assign the macro to the form event “After record action”.
- Configure the macro by adding a hidden control named “AutoRefresh” to the editable form and add the element(s) to be refreshed to the hidden control’s “Value” property. Form navigator → right-click the form and choose
New > Hidden Control
. Get the properties, rename to “AutoRefresh” and add the element or a semicolon separated list of elements. Refreshable elements are (sub-)forms, list boxes and combo boxes.
Subform
refreshes this form’s element “Subform”.
Subform;Table Control/Listbox1
refreshes this form’s element “Subform” AND the column named “Listbox1” within this form’s element named “Table Control”.
../Combo Box1
refreshes “Combo Box1” within this form’s parent form.
The “After record action” is triggered when a record has been saved, inserted or removed.
Thanks for the information about macros and sub form, but my odb file is quite simple. The main form has a combo box at the top to select a year, and that is all.
I could upload the file if you wish, so that you could perhaps have a look on how i would use a macro and sub form in it.
Of course. I can not even imagine, how to select a year from a combo box and what should happen then.
Thanks and the files is included.
To select a year / month, open the combo box select what year / month, then press the ‘GO’ button.
Just to note that I did not make the combo box as it was done for me on here about 18 months ago by another member.
LeedsWXData.odb (961.0 KB)