GoTop

ACCPAC Common Controls

AccpacView.GoTop

Retrieves the first logical record in the view according to the direction and filter set in the last Browse call.

Function GoTop() As Boolean

Return Value

Returns whether a record was retrieved. If the table is empty, or if no records match the filter set in the last Browse call, FALSE is returned.

Example

The following example retrieves the first record whose bank code is greater than "SEATAC". By specifying TRUE as the Ascending parameter in the Browse method, ascending order is used to determine the first record.
 

Dim BKACCT1header As AccpacCOMAPI.AccpacView

mDBLinkCmpRW.OpenView "BK0001", BKACCT1header

Dim Status as Boolean

BKACCT1header.Browse "BANK>""SEATAC""", True

Status = BKACCT1header.GoTop

If Status = False Then

    MsgBox "There are no banks after SEATAC."

    Exit Sub

End If