Equivalent macro to Update or refresh form

Discuss the database features

Equivalent macro to Update or refresh form

Postby xeski » Sat Dec 08, 2018 11:39 am

Hello everyone,

I'm new on macros and I'm trying to update a form after change in Listbox, it works with a button with associated action of "Update form"
but I can't find the equivalent macro to associate with the listbox.

I've search on the macro's library (macros in FormWizard) but without results...

Thanks in advance
Libreoffice 6.0.6.2 on Windows 7
xeski
 
Posts: 2
Joined: Sat Dec 08, 2018 11:31 am

Re: Equivalent macro to Update or refresh form

Postby longi » Sat Dec 08, 2018 2:44 pm

Hi!

Something like this?

Code: Select all   Expand viewCollapse view
    oForm=Event.Source
    If oForm.isNew then
    oForm.insertRow
    Else
    oForm.UpdateRow
    End if


Bye! ;)
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
longi
 
Posts: 99
Joined: Mon Jul 15, 2013 5:04 pm

Re: Equivalent macro to Update or refresh form

Postby Villeroy » Sat Dec 08, 2018 5:58 pm

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25952
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 3 guests