Newbie having form navigation trouble

I have a form with a sub form. Simple customers with a list of meeting records.

I’m trying to create next & previous buttons but they often work on the sub form not the main top level form.

I’m trying to solve this by making a macro to click on a field in the main form then call “next”. I think my form is called Bookings, that’s how it appears in the main screen. But this gives a nosuchelement error:

ThisComponent.Drawpage.Forms.getByName("Bookings")

How do I find the correct name for my form?
Is there a better way to implement next / previous buttons for the main form?

Thanks :slight_smile:

If a button will be executed in a subform it has been created in the subform.
Open the form for editing.
Open the form navigator (shows mainform, subform an all controls).
Move the button from subform to mainform. So it will execute in mainform.

In the subform’s data properties, the navigation toolbar can be set up to control the parent form.

I believe it’s on the main form. The subform is just showing as a table so I’d not be able to place controls on it.

Open the form for editing, not for input data.
Go to Form → Form Navigator
This will show Mainform and Subform. Every form could contain controls. Tablecontrol is only a control in the subform. There could be more controls in this form.
Show the screenshot of the opened form navigator, showing all controls.

Thanks, I’d never have guessed what was actually going on with button parenting :slight_smile: