I have this problem when: 1. On Form I have two forms, each attached to the different table 2. I am inserting new row in sub-form, by editing list boxes, and date list boxes. NOTE: The subform is joined to the main table by master - slave field. 3. When I click on the drop-down button on date list box (one field in my table stores date), this exception occures: Type: com.sun.star.container.NoSuchElementException And I have no macro, just editing NewRow in my table. To get this exception caught I had to add a macro to the "Before Record Action" event (see below). The problem is that I simply click on the date control. Or sometimes double-click the form (not any specific control) - and the whole LibreOffice crashes and the I had to recover the file. Function prevent_saving_uncompleted_record (oEvent As Object) REM When clicking on the Form during record modification/creation, Libre Office unexpectedly attempts to save uncompleted record REM Because of that this function is set on the "Before record action" event to prevent saving a record during modifications. REM Set up error handler On error GoTo ErrorHandler REM By default all modifications to the row are not allowed prevent_saving_uncompleted_record = True Dim oForm As Object Dim oControl As Object oForm = oEvent.Source.Model oControl = oForm.GetByName("Save button") REM Check if "Save button" is enabled (it is enabled when any of the field has changed) If oControl.Enabled = "True" Then prevent_saving_uncompleted_record = False End If Exit Function ErrorHandler: MsgBox "Error " & err & ": " & error$ + chr(13) + "In line : " + Erl + chr(13) + Now , 16 ,"An error occurred" End Function
It was my fault. Still learning ... :) Crash will be logged into separate issue. Here I had a wrong control name.