Putting Table Navigation Buttons on Your Form

Description

Button2 and Button3 provide convenient, on-form navigation controls for moving to the first and last records of the browse. The buttons have the following properties:

Each button calls two Xbasic functions.

 Xbasic Code Run by the Button2 OnPush Event

This simple Xbasic routine retrieves and displays the first record in the table.

browse1.fetch_first()
browse1.activate()

 An Explanation of the Xbasic Code

The first line causes browse1 to display the first line of the table.

browse1.fetch_first()

The second line gives focus to the browse so it can display the new data.

browse1.activate()

 Xbasic Code Run by the Button3 OnPush Event

This simple Xbasic routine retrieves and displays the last record in the table.

browse1.fetch_last()
browse1.activate()

An Explanation of the Xbasic Code The first line causes browse1 to display the last line of the table.

browse1.fetch_last()

The second line gives focus to the browse so it can display the new data.

browse1.activate()

See Also