PreviousActiveX Controls Guide (v10) Next

Percentage

Chapter contents

Applies to:

VAccess

Description

Sets the record to retrieve at the specified relative position along the currently selected index path in the associated Pervasive PSQL file, or returns the relative position of the current record.

Syntax

object.Percentage [= value] 

The Percentage property syntax has these parts:

Part
Description
object
An object expression that evaluates to an object in the Applies To list.
value
A long integer value in the range 0 to 10000, corresponding to a percentage between 0.00% and 100.00%. Setting this property at run time will retrieve the record at that approximate percentage along the current index path. Reading this property at run time returns a value in the same range representing the position of the current record.

Remarks

Setting this property at run time performs a Pervasive PSQL GetByPercentage operation on the associated file. The status of the operation is returned in the Status property of the control, a status of zero indicating success. Reading this property at run time performs a Pervasive PSQL FindPercentage operation and returns the result of the operation. These operations are in versions of the MKDE 6.x and later. The range of values is 0 to 10,000 (or 0 to 0xFFFFFFFF if you specify a granularity; see see "Get By Percentage (44)" on page 2-49 and see "Find Percentage (45)" on page 2-45 of Btrieve API Guide), representing 0.00 to 100.00 percent. The accuracy of the percentage operation is subject to various conditions.

If the ExtendedOps property is False, setting this property at run time performs a GetByPercentage operation on the associated file. If ExtendedOps is True, setting this property will move the current Row property value to the specified percentage within the current extended operations buffer.

If the ExtendedOps property is False, reading this property at run time performs a FindPercentage operation and returns the result of the operation as the property value. If ExtendedOps is True, the retd value will represent the percentage of the current row within the current extended operations buffer.

Example

'to establish positioning on a record half way  
'through the current index path 
Customer.Percentage = 5000 
'to set the scroll box of a scroll bar to  
'the current record's position 
VScroll1.Max = 10000 
VScroll1.Min = 0 
VScroll1.FieldValue = Customer.Percentage 

See Also:

Affects: Buffer


Chapter contents
Book contents

Prev topic: PageSize
Next topic: Port