I am developing a LibreOffice Base form. I want the form to open by setting up a new-row insert.
I found the following function – I think in this forum, via a Google search.
Sub GoToNewRecord()
Dim oForm As Object
Rem Get the internal form
oForm = ThisComponent.Drawpage.Forms.getByName("MainForm")
Rem Set records to be loaded
oForm.FetchSize = 5000
Rem Move to insert row record
oForm.moveToInsertRow()
End Sub
I have it installed in My Macros & Dialogs.Standard and configured as a “When loading” event.
It was working yesterday.
Today I get the following error:
BASIC runtime error.
An exception occurred
Type: com.sun.star.sdbc.SQLException
Message: INSERT privilege not available
OTOH I am able to insert rows in the table directly by editing the table, so the issue is not with my fundamental privileges (I am a super admin or something like that).
Any clues?