Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Equivalent of VBA "OldValue" attribute for form fields

When using forms on VBA, each form field as an "OldValue" attribute which is set when the user changed the field, but the field is not yet committed to the database row. This allows scripts to do things based on this old value as well as on the new value entered by the user.

I'm looking for a similar attribute or a way to retrieve this value in some way in Libreoffice Base macros.

My use case is as follows: I have a table with textual ID's and there is a file on disk linked to each ID (the filename is that ID). However if the ID changes, the file should be renamed as well. And in order to rename a file, I need to know the old ID as well as the new ID.

But so far I haven't found an attribute or function on a text field in LO that gives me access to this old ID. Is there a way ?