Hi, is there a macro command that is equal to pressing the "Undo Data Entry" button on the form navigation bar??
Thanks a lot!!
Ponlerd
[Solved] Macro equivalent for Undo entry button
[Solved] Macro equivalent for Undo entry button
Last edited by ponlerd on Tue Mar 23, 2010 12:24 pm, edited 1 time in total.
OOo 3.2 Ubuntu 9.04 / OOo 3.2 Windows7 / Migrating from Access
Re: Macro equivalent for Undo entry button
Hello
Use a standard button and adjust the properties as you need. It acts only the form/subform where the button is.
http://user.services.openoffice.org/en/ ... 83&t=28235
Romke
Use a standard button and adjust the properties as you need. It acts only the form/subform where the button is.
http://user.services.openoffice.org/en/ ... 83&t=28235
Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
Re: Macro equivalent for Undo entry button
Thank you for your super fast reply, but my problem is a bit more complicated.
Actually your solution will work, but is it possible to add some more action to the button, such as
General button action set to Undo
After the button is clicked, i want to be able to attach a macro after the undo was done.
I was planning to set the action of the button to None, and then write a macro attached to the Execute Action event like this.
sub XXX_ExecuteAction (Event as Object)
.... whatever command to undo
.... then other steps i want to do.
end sub
Now if i use the general action of the button, can i attach a macro to do the other steps that i want ??
Thank you so much for your help.
Ponlerd
Actually your solution will work, but is it possible to add some more action to the button, such as
General button action set to Undo
After the button is clicked, i want to be able to attach a macro after the undo was done.
I was planning to set the action of the button to None, and then write a macro attached to the Execute Action event like this.
sub XXX_ExecuteAction (Event as Object)
.... whatever command to undo
.... then other steps i want to do.
end sub
Now if i use the general action of the button, can i attach a macro to do the other steps that i want ??
Thank you so much for your help.
Ponlerd
OOo 3.2 Ubuntu 9.04 / OOo 3.2 Windows7 / Migrating from Access
Re: Macro equivalent for Undo entry button
Hello
I don't know if you can bind an action and an event to the same button but you can easy try it.
Start first with study how OOo-base is working before writing macros. When you start with macros, start with understanding the idea of services and interfaces. When you understand how it works then your code can be more easy. This is true for the SQL and macros.
You can bind all kind off subs to events of a form.
I think your are searching for:
oForm.refreshRow
http://api.openoffice.org/docs/common/r ... ltSet.html
Romke
I don't know if you can bind an action and an event to the same button but you can easy try it.
Start first with study how OOo-base is working before writing macros. When you start with macros, start with understanding the idea of services and interfaces. When you understand how it works then your code can be more easy. This is true for the SQL and macros.
You can bind all kind off subs to events of a form.
I think your are searching for:
oForm.refreshRow
http://api.openoffice.org/docs/common/r ... ltSet.html
Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
Re: Macro equivalent for Undo entry button
Thank you so much !
That is it!
Form.RefreshRow()
That is it!
Form.RefreshRow()
OOo 3.2 Ubuntu 9.04 / OOo 3.2 Windows7 / Migrating from Access
Re: [Solved] Macro equivalent for Undo entry button
Be careful - refreshrow() may act on multiple rows! I needed to only undo data entry on a single row - the solution here seems to work: [Solved] Cancel insert row
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database