GoPrev

ACCPAC Common Controls

AccpacView.GoPrev

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

Function GoPrev() As Boolean

Return Value

Returns whether a previous record exists and is retrieved. If the beginning of the table is reached, FALSE is returned.

Example

The following example starts scanning at the record whose bank code is equal to or less than "SEATAC"; then retrieves all previous records until the beginning of the table is reached, or an error occurs. By specifying TRUE as the Ascending parameter in the Browse method, ascending order is used to determine the previous record.
 

Dim BKACCT1header As AccpacCOMAPI.AccpacView

mDBLinkCmpRW.OpenView "BK0001", BKACCT1header

Dim Status as Boolean

BKACCT1header.Browse "BANK<=""SEATAC""", True

Status = BKACCT1header.GoPrev

Do While Status = True

    Status = BKACCT1header.GoPrev

Loop