Ask Your Question

In Base, how do you make navigation button that goes to a place within the same form? [closed]

asked 2015-11-07 02:15:44 +0200

gugglebun gravatar image

I am making a data entry form that's got some different sections on it. I would like to make up some navigation buttons (a switchboard type thing) that will jump the user to a specific section that's further down the same form, so they don't have to scroll. I "could" make the sections different forms, but I'd rather it be all on the one form. Is this possible and, if so, how is it done?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-27 13:03:05.583195

2 Answers

Sort by » oldest newest most voted

answered 2015-11-12 08:21:30 +0200

pierre-yves samyn gravatar image


If the form contains sections you do not need macros. You can insert hyperlink buttons to sections: Insert Hyperlink, on the left select Document, click the Target button, select the section target, select form Button, give the text you want as label.


See this example: Sections.odb

Note: it will change the anchor of the button to be able to move it (e.g. anchor page).


edit flag offensive delete link more

answered 2015-11-12 02:15:30 +0200

doug gravatar image

The simplest way to do this is just to move the focus to the first control in the section, or to the last and then first control in a manner that makes the screen scroll as desired. In the example below, the third indexed control is near the bottom of the form, and the second (actually, a button) is at the top of the section. This makes the screen go to the right place.

Sub ChangeFocus

root_doc = ThisComponent
drw = ThisComponent.DrawPage
form_container = drw.Forms
main_form = form_container.getByIndex(0)
ctrl = main_form.getByIndex(3)
butn = main_form.getByIndex(2)

cntrllr = ThisComponent.getCurrentController

End Sub

It probably also is possible to manually set the scroll level, but that would be difficult to maintain because the forms also have a zoom level and so the amount of the scroll that is necessary could change.

Hope this helps.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-11-07 02:15:44 +0200

Seen: 363 times

Last updated: Nov 12 '15