[Solved] New record already active when opening a form
-
- Posts: 89
- Joined: Tue Jul 16, 2013 2:24 pm
[Solved] New record already active when opening a form
Hello, how do you open a form with the new record already active? If possible without macros, thank you.
Last edited by pinco pallo on Tue Jan 14, 2014 5:51 pm, edited 1 time in total.
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
Re: New record already active when opening a form
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 89
- Joined: Tue Jul 16, 2013 2:24 pm
Re: New record already active when opening a form
I followed your topic, but so I no longer see the other records. Or am I wrong? See please attached example with two forms. Thanks.
- Attachments
-
- Example.odb
- (18.08 KiB) Downloaded 176 times
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
Re: New record already active when opening a form
'Add data only' does restrict the Form to records added since opening the Form. To see all records while opening the Form to a new record will require a macro:
Code: Select all
Sub InitializeForm 'Form > Event > When Loading Dim oForm As Object oForm = ThisComponent.DrawPage.Forms.GetByIndex(0) '.GetByName("MainForm") IF oForm.isloaded = false THEN Wait 100 'allows faster CPUs to continue while waiting for slower ones ' oForm.Last ' oForm.First 'this line along with .Last above leaves the total number of records in nav bar oForm.MoveToInsertRow End Sub
- Attachments
-
- Example_v2.odb
- Open Form to New Record using a macro
- (20.29 KiB) Downloaded 278 times
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Re: New record already active when opening a form
Or a single click on some form button, toolbar button or Ctrl+PgDownDACM wrote:'Add data only' does restrict the Form to records added since opening the Form. To see all records while opening the Form to a new record will require a macro:
And of course you can have one form to enter new records, another one to scroll, filter sort in the same table.
Macros are evil.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 89
- Joined: Tue Jul 16, 2013 2:24 pm
Re: New record already active when opening a form
I also prefer no macro, but if you need ...
Thanks to all.
Thanks to all.
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)