Hi,
I have a simple macro assigned to a push button to change allowupdates to "true", but for it to work it needs to reload the form. When the form is reloaded it goes back to the first record but I need it to stay on the current record. Is there a way of doing this?
[SOLVED] Reload form but stay on current record
[SOLVED] Reload form but stay on current record
Last edited by robleyd on Wed Jan 29, 2020 1:21 pm, edited 2 times in total.
Reason: Add green tick
Reason: Add green tick
OpenOffice 4.1.5 on Windows 7 Professional
Re: Reload form but stay on current record
Try this:
R
Code: Select all
Sub Reload_Form_keep_current_Row
oForm = ThisComponent.DrawPage.Forms.getbyName("MainForm")
nRow = oForm.Row
oForm.reload 'reload form
oForm.Absolute(nRow) 'set the cursor back to previous current row
End Sub
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Reload form but stay on current record
Perfect, thank you!
OpenOffice 4.1.5 on Windows 7 Professional